From fab905e4bc28b3ee1cff31dc9fe605b75f37a7a5 Mon Sep 17 00:00:00 2001 From: cyian-1756 Date: Sat, 19 May 2018 12:35:38 -0400 Subject: [PATCH] Added more unit tests --- .../tst/ripper/rippers/ShesFreakyRipperTest.java | 6 ++++++ .../ripme/tst/ripper/rippers/SinfestRipperTest.java | 6 ++++++ .../tst/ripper/rippers/SinnercomicsRipperTest.java | 6 ++++++ .../ripme/tst/ripper/rippers/SmuttyRipperTest.java | 6 ++++++ .../ripme/tst/ripper/rippers/StaRipperTest.java | 6 ++++++ .../ripme/tst/ripper/rippers/TapasticRipperTest.java | 6 ++++++ .../tst/ripper/rippers/TeenplanetRipperTest.java | 6 ++++++ .../ripme/tst/ripper/rippers/VidbleRipperTest.java | 6 ++++++ .../ripme/tst/ripper/rippers/XbooruRipperTest.java | 6 ++++++ .../ripme/tst/ripper/rippers/XhamsterRipperTest.java | 6 ++++++ .../ripme/tst/ripper/rippers/YuvutuRipperTest.java | 6 ++++++ .../ripme/tst/ripper/rippers/ZizkiRipperTest.java | 12 ++++++++++++ 12 files changed, 78 insertions(+) diff --git a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/ShesFreakyRipperTest.java b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/ShesFreakyRipperTest.java index 3efa31b4..65f371d1 100644 --- a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/ShesFreakyRipperTest.java +++ b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/ShesFreakyRipperTest.java @@ -13,4 +13,10 @@ public class ShesFreakyRipperTest extends RippersTest { testRipper(ripper); } */ + + public void testGetGID() throws IOException { + URL url = new URL("http://www.shesfreaky.com/gallery/nicee-snow-bunny-579NbPjUcYa.html"); + ShesFreakyRipper ripper = new ShesFreakyRipper(url); + assertEquals("nicee-snow-bunny-579NbPjUcYa", ripper.getGID(url)); + } } diff --git a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/SinfestRipperTest.java b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/SinfestRipperTest.java index c46e922c..c4f56432 100644 --- a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/SinfestRipperTest.java +++ b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/SinfestRipperTest.java @@ -10,4 +10,10 @@ public class SinfestRipperTest extends RippersTest { SinfestRipper ripper = new SinfestRipper(new URL("http://sinfest.net/view.php?date=2000-01-17")); testRipper(ripper); } + + public void testGetGID() throws IOException { + URL url = new URL("http://sinfest.net/view.php?date=2000-01-17"); + SinfestRipper ripper = new SinfestRipper(url); + assertEquals("2000-01-17", ripper.getGID(url)); + } } \ No newline at end of file diff --git a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/SinnercomicsRipperTest.java b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/SinnercomicsRipperTest.java index d1ce6b33..3866b6ba 100644 --- a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/SinnercomicsRipperTest.java +++ b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/SinnercomicsRipperTest.java @@ -10,4 +10,10 @@ public class SinnercomicsRipperTest extends RippersTest { SinnercomicsRipper ripper = new SinnercomicsRipper(new URL("https://sinnercomics.com/comic/beyond-the-hotel-page-01/")); testRipper(ripper); } + + public void testGetGID() throws IOException { + URL url = new URL("https://sinnercomics.com/comic/beyond-the-hotel-page-01/"); + SinnercomicsRipper ripper = new SinnercomicsRipper(url); + assertEquals("beyond-the-hotel", ripper.getGID(url)); + } } \ No newline at end of file diff --git a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/SmuttyRipperTest.java b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/SmuttyRipperTest.java index 949e715f..c7aa694e 100644 --- a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/SmuttyRipperTest.java +++ b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/SmuttyRipperTest.java @@ -10,4 +10,10 @@ public class SmuttyRipperTest extends RippersTest { SmuttyRipper ripper = new SmuttyRipper(new URL("https://smutty.com/user/QUIGON/")); testRipper(ripper); } + + public void testGetGID() throws IOException { + URL url = new URL("https://smutty.com/user/QUIGON/"); + SmuttyRipper ripper = new SmuttyRipper(url); + assertEquals("QUIGON", ripper.getGID(url)); + } } diff --git a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/StaRipperTest.java b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/StaRipperTest.java index 128f3f17..c9aded3e 100644 --- a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/StaRipperTest.java +++ b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/StaRipperTest.java @@ -10,4 +10,10 @@ public class StaRipperTest extends RippersTest { StaRipper ripper = new StaRipper(new URL("https://sta.sh/2hn9rtavr1g")); testRipper(ripper); } + + public void testGetGID() throws IOException { + URL url = new URL("https://sta.sh/2hn9rtavr1g"); + StaRipper ripper = new StaRipper(url); + assertEquals("2hn9rtavr1g", ripper.getGID(url)); + } } \ No newline at end of file diff --git a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/TapasticRipperTest.java b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/TapasticRipperTest.java index 9617e4b8..f9e448e6 100644 --- a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/TapasticRipperTest.java +++ b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/TapasticRipperTest.java @@ -10,4 +10,10 @@ public class TapasticRipperTest extends RippersTest { TapasticRipper ripper = new TapasticRipper(new URL("https://tapas.io/series/tsiwbakd-comic")); testRipper(ripper); } + + public void testGetGID() throws IOException { + URL url = new URL("https://tapas.io/series/tsiwbakd-comic"); + TapasticRipper ripper = new TapasticRipper(url); + assertEquals("series_ tsiwbakd-comic", ripper.getGID(url)); + } } diff --git a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/TeenplanetRipperTest.java b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/TeenplanetRipperTest.java index aa43103b..a402ebc3 100644 --- a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/TeenplanetRipperTest.java +++ b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/TeenplanetRipperTest.java @@ -10,4 +10,10 @@ public class TeenplanetRipperTest extends RippersTest { TeenplanetRipper ripper = new TeenplanetRipper(new URL("http://teenplanet.org/galleries/the-perfect-side-of-me-6588.html")); testRipper(ripper); } + + public void testGetGID() throws IOException { + URL url = new URL("http://teenplanet.org/galleries/the-perfect-side-of-me-6588.html"); + TeenplanetRipper ripper = new TeenplanetRipper(url); + assertEquals("the-perfect-side-of-me-6588", ripper.getGID(url)); + } } diff --git a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/VidbleRipperTest.java b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/VidbleRipperTest.java index ccbeb8bb..9659d630 100644 --- a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/VidbleRipperTest.java +++ b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/VidbleRipperTest.java @@ -10,5 +10,11 @@ public class VidbleRipperTest extends RippersTest { VidbleRipper ripper = new VidbleRipper(new URL("http://www.vidble.com/album/y1oyh3zd")); testRipper(ripper); } + + public void testGetGID() throws IOException { + URL url = new URL("http://www.vidble.com/album/y1oyh3zd"); + VidbleRipper ripper = new VidbleRipper(url); + assertEquals("y1oyh3zd", ripper.getGID(url)); + } } diff --git a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/XbooruRipperTest.java b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/XbooruRipperTest.java index 8eefd4e3..6dfc0bab 100644 --- a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/XbooruRipperTest.java +++ b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/XbooruRipperTest.java @@ -10,4 +10,10 @@ public class XbooruRipperTest extends RippersTest { XbooruRipper ripper = new XbooruRipper(new URL("http://xbooru.com/index.php?page=post&s=list&tags=furry")); testRipper(ripper); } + + public void testGetGID() throws IOException { + URL url = new URL("http://xbooru.com/index.php?page=post&s=list&tags=furry"); + XbooruRipper ripper = new XbooruRipper(url); + assertEquals("furry", ripper.getGID(url)); + } } \ No newline at end of file diff --git a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/XhamsterRipperTest.java b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/XhamsterRipperTest.java index f66b27d1..54b22eb0 100644 --- a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/XhamsterRipperTest.java +++ b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/XhamsterRipperTest.java @@ -16,4 +16,10 @@ public class XhamsterRipperTest extends RippersTest { XhamsterRipper ripper = new XhamsterRipper(new URL("https://xhamster.com/photos/gallery/japanese-dolls-4-asahi-mizuno-7254664")); testRipper(ripper); } + + public void testGetGID() throws IOException { + URL url = new URL("https://xhamster.com/photos/gallery/japanese-dolls-4-asahi-mizuno-7254664"); + XhamsterRipper ripper = new XhamsterRipper(url); + assertEquals("7254664", ripper.getGID(url)); + } } diff --git a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/YuvutuRipperTest.java b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/YuvutuRipperTest.java index a74b76e9..1a304468 100644 --- a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/YuvutuRipperTest.java +++ b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/YuvutuRipperTest.java @@ -16,4 +16,10 @@ public class YuvutuRipperTest extends RippersTest { YuvutuRipper ripper = new YuvutuRipper(new URL("http://www.yuvutu.com/modules.php?name=YuGallery&action=view&set_id=420333")); testRipper(ripper); } + + public void testGetGID() throws IOException { + URL url = new URL("http://www.yuvutu.com/modules.php?name=YuGallery&action=view&set_id=420333"); + YuvutuRipper ripper = new YuvutuRipper(url); + assertEquals("420333", ripper.getGID(url)); + } } diff --git a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/ZizkiRipperTest.java b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/ZizkiRipperTest.java index de953be8..9facf481 100644 --- a/src/test/java/com/rarchives/ripme/tst/ripper/rippers/ZizkiRipperTest.java +++ b/src/test/java/com/rarchives/ripme/tst/ripper/rippers/ZizkiRipperTest.java @@ -10,4 +10,16 @@ public class ZizkiRipperTest extends RippersTest { ZizkiRipper ripper = new ZizkiRipper(new URL("http://zizki.com/dee-chorde/we-got-spirit")); testRipper(ripper); } + + public void testGetGID() throws IOException { + URL url = new URL("http://zizki.com/dee-chorde/we-got-spirit"); + ZizkiRipper ripper = new ZizkiRipper(url); + assertEquals("dee-chorde", ripper.getGID(url)); + } + + public void testAlbumTitle() throws IOException { + URL url = new URL("http://zizki.com/dee-chorde/we-got-spirit"); + ZizkiRipper ripper = new ZizkiRipper(url); + assertEquals("zizki_Dee Chorde_We Got Spirit", ripper.getAlbumTitle(url)); + } }