mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-29 08:40:37 +02:00
Fixed Tsumino ripper unit test
This commit is contained in:
@@ -11,22 +11,22 @@ import org.jsoup.nodes.Document;
|
|||||||
|
|
||||||
public class TsuminoRipperTest extends RippersTest {
|
public class TsuminoRipperTest extends RippersTest {
|
||||||
public void testTsuminoRipper() throws IOException {
|
public void testTsuminoRipper() throws IOException {
|
||||||
TsuminoRipper ripper = new TsuminoRipper(new URL("http://www.tsumino.com/Book/Info/42882/chaldea-maid-"));
|
TsuminoRipper ripper = new TsuminoRipper(new URL("http://www.tsumino.com/Book/Info/43528/sore-wa-kurokute-suketeita-what-s-tight-and-black-and-sheer-all-over-"));
|
||||||
testRipper(ripper);
|
testRipper(ripper);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testTagBlackList() throws IOException {
|
public void testTagBlackList() throws IOException {
|
||||||
TsuminoRipper ripper = new TsuminoRipper(new URL("http://www.tsumino.com/Book/Info/42882/chaldea-maid-"));
|
TsuminoRipper ripper = new TsuminoRipper(new URL("http://www.tsumino.com/Book/Info/43528/sore-wa-kurokute-suketeita-what-s-tight-and-black-and-sheer-all-over-"));
|
||||||
Document doc = ripper.getFirstPage();
|
Document doc = ripper.getFirstPage();
|
||||||
List<String> tagsOnPage = ripper.getTags(doc);
|
List<String> tagsOnPage = ripper.getTags(doc);
|
||||||
String[] tags1 = {"test", "one", "Blowjob"};
|
String[] tags1 = {"test", "one", "Smell"};
|
||||||
String blacklistedTag = RipUtils.checkTags(tags1, tagsOnPage);
|
String blacklistedTag = RipUtils.checkTags(tags1, tagsOnPage);
|
||||||
assertEquals("blowjob", blacklistedTag);
|
assertEquals("smell", blacklistedTag);
|
||||||
|
|
||||||
// Test a tag with spaces
|
// Test a tag with spaces
|
||||||
String[] tags2 = {"test", "one", "Full Color"};
|
String[] tags2 = {"test", "one", "Face sitting"};
|
||||||
blacklistedTag = RipUtils.checkTags(tags2, tagsOnPage);
|
blacklistedTag = RipUtils.checkTags(tags2, tagsOnPage);
|
||||||
assertEquals("full color", blacklistedTag);
|
assertEquals("face sitting", blacklistedTag);
|
||||||
|
|
||||||
// Test a album with no blacklisted tags
|
// Test a album with no blacklisted tags
|
||||||
String[] tags3 = {"nothing", "one", "null"};
|
String[] tags3 = {"nothing", "one", "null"};
|
||||||
|
Reference in New Issue
Block a user