Merge pull request #948 from cyian-1756/xhamsterGetNextPageUnitTests

Added getNextPage unit test for xhamster ripper
This commit is contained in:
cyian-1756 2018-09-16 14:59:25 -04:00 committed by GitHub
commit 50c8acb676
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,7 @@ import java.io.IOException;
import java.net.URL;
import com.rarchives.ripme.ripper.rippers.XhamsterRipper;
import org.jsoup.nodes.Document;
public class XhamsterRipperTest extends RippersTest {
@ -27,4 +28,14 @@ public class XhamsterRipperTest extends RippersTest {
XhamsterRipper ripper = new XhamsterRipper(url);
assertEquals("7254664", ripper.getGID(url));
}
public void testGetNextPage() throws IOException {
XhamsterRipper ripper = new XhamsterRipper(new URL("https://pt.xhamster.com/photos/gallery/silvana-7105696"));
Document doc = ripper.getFirstPage();
try {
ripper.getNextPage(doc);
} catch (IOException e) {
throw new Error("Was unable to get next page of album");
}
}
}