mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-24 14:33:17 +02:00
new URI instead of new URL in tests, Gfycat.
This commit is contained in:
@@ -4,35 +4,33 @@ import com.rarchives.ripme.ripper.rippers.GfycatRipper;
|
|||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URL;
|
import java.net.URI;
|
||||||
|
import java.net.URISyntaxException;
|
||||||
|
|
||||||
|
|
||||||
public class GfycatRipperTest extends RippersTest {
|
public class GfycatRipperTest extends RippersTest {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rips correctly formatted URL directly from Gfycat
|
* Rips correctly formatted URL directly from Gfycat
|
||||||
* @throws IOException
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testGfycatGoodURL() throws IOException{
|
public void testGfycatGoodURL() throws IOException, URISyntaxException {
|
||||||
GfycatRipper ripper = new GfycatRipper(new URL("https://gfycat.com/TemptingExcellentIchthyosaurs"));
|
GfycatRipper ripper = new GfycatRipper(new URI("https://gfycat.com/TemptingExcellentIchthyosaurs").toURL());
|
||||||
testRipper(ripper);
|
testRipper(ripper);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Rips badly formatted URL directly from Gfycat
|
* Rips badly formatted URL directly from Gfycat
|
||||||
* @throws IOException
|
|
||||||
*/
|
*/
|
||||||
public void testGfycatBadURL() throws IOException {
|
public void testGfycatBadURL() throws IOException, URISyntaxException {
|
||||||
GfycatRipper ripper = new GfycatRipper(new URL("https://gfycat.com/gifs/detail/limitedtestyamericancrow"));
|
GfycatRipper ripper = new GfycatRipper(new URI("https://gfycat.com/gifs/detail/limitedtestyamericancrow").toURL());
|
||||||
testRipper(ripper);
|
testRipper(ripper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rips a Gfycat profile
|
* Rips a Gfycat profile
|
||||||
* @throws IOException
|
|
||||||
*/
|
*/
|
||||||
public void testGfycatProfile() throws IOException {
|
public void testGfycatProfile() throws IOException, URISyntaxException {
|
||||||
GfycatRipper ripper = new GfycatRipper(new URL("https://gfycat.com/@golbanstorage"));
|
GfycatRipper ripper = new GfycatRipper(new URI("https://gfycat.com/@golbanstorage").toURL());
|
||||||
testRipper(ripper);
|
testRipper(ripper);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -40,17 +38,16 @@ public class GfycatRipperTest extends RippersTest {
|
|||||||
* Rips a Gfycat amp link
|
* Rips a Gfycat amp link
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
public void testGfycatAmp() throws IOException {
|
public void testGfycatAmp() throws IOException, URISyntaxException {
|
||||||
GfycatRipper ripper = new GfycatRipper(new URL("https://gfycat.com/amp/TemptingExcellentIchthyosaurs"));
|
GfycatRipper ripper = new GfycatRipper(new URI("https://gfycat.com/amp/TemptingExcellentIchthyosaurs").toURL());
|
||||||
testRipper(ripper);
|
testRipper(ripper);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Rips a Gfycat profile with special characters in username
|
* Rips a Gfycat profile with special characters in username
|
||||||
* @throws IOException
|
|
||||||
*/
|
*/
|
||||||
public void testGfycatSpecialChar() throws IOException {
|
public void testGfycatSpecialChar() throws IOException, URISyntaxException {
|
||||||
GfycatRipper ripper = new GfycatRipper(new URL("https://gfycat.com/@rsss.kr"));
|
GfycatRipper ripper = new GfycatRipper(new URI("https://gfycat.com/@rsss.kr").toURL());
|
||||||
testRipper(ripper);
|
testRipper(ripper);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user