From 13e170cb61ddec0cd036ac78347ad13208eca28c Mon Sep 17 00:00:00 2001 From: Javi Rueda Date: Tue, 16 Feb 2021 16:42:05 +0100 Subject: [PATCH] Add unit test for LbryUri.toTvString --- .../java/io/lbry/browser/utils/LbryUriTest.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/app/src/test/java/io/lbry/browser/utils/LbryUriTest.java b/app/src/test/java/io/lbry/browser/utils/LbryUriTest.java index 36ce5b49..1a5730e6 100644 --- a/app/src/test/java/io/lbry/browser/utils/LbryUriTest.java +++ b/app/src/test/java/io/lbry/browser/utils/LbryUriTest.java @@ -113,6 +113,19 @@ public class LbryUriTest { assertEquals(expectedForChannel, obtained); } + @Test + public void lbryToTvString() { + LbryUri obtained = new LbryUri(); + + try { + obtained = LbryUri.parse("lbry://@lbry#3f/lbryturns4#6",false); + } catch (LbryUriException e) { + e.printStackTrace(); + } + + assertEquals("https://lbry.tv/@lbry:3f/lbryturns4:6", obtained.toTvString()); + } + @NotNull private LbryUri sinthesizeExpected() { LbryUri expectedForChannel = new LbryUri();