mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-08-12 00:44:03 +02:00
AbstractRipperTest.java - format, organize imports
This commit is contained in:
@@ -1,33 +1,39 @@
|
|||||||
package com.rarchives.ripme.tst;
|
package com.rarchives.ripme.tst;
|
||||||
|
|
||||||
import com.rarchives.ripme.ripper.AbstractRipper;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
import org.junit.jupiter.api.Test;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
import java.net.URISyntaxException;
|
import java.net.URISyntaxException;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
import com.rarchives.ripme.ripper.AbstractRipper;
|
||||||
|
|
||||||
public class AbstractRipperTest {
|
public class AbstractRipperTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testGetFileName() throws IOException, URISyntaxException {
|
public void testGetFileName() throws IOException, URISyntaxException {
|
||||||
String fileName = AbstractRipper.getFileName(new URI("http://www.tsumino.com/Image/Object?name=U1EieteEGwm6N1dGszqCpA%3D%3D").toURL(),null, "test", "test");
|
String fileName = AbstractRipper.getFileName(
|
||||||
assertEquals("test.test", fileName);
|
new URI("http://www.tsumino.com/Image/Object?name=U1EieteEGwm6N1dGszqCpA%3D%3D").toURL(),
|
||||||
|
null, "test", "test");
|
||||||
|
assertEquals("test.test", fileName);
|
||||||
|
|
||||||
fileName = AbstractRipper.getFileName(new URI("http://www.tsumino.com/Image/Object?name=U1EieteEGwm6N1dGszqCpA%3D%3D").toURL(), null,"test", null);
|
fileName = AbstractRipper.getFileName(
|
||||||
assertEquals("test", fileName);
|
new URI("http://www.tsumino.com/Image/Object?name=U1EieteEGwm6N1dGszqCpA%3D%3D").toURL(),
|
||||||
|
null, "test", null);
|
||||||
|
assertEquals("test", fileName);
|
||||||
|
|
||||||
fileName = AbstractRipper.getFileName(new URI("http://www.tsumino.com/Image/Object?name=U1EieteEGwm6N1dGszqCpA%3D%3D").toURL(), null,null, null);
|
fileName = AbstractRipper.getFileName(
|
||||||
assertEquals("Object", fileName);
|
new URI("http://www.tsumino.com/Image/Object?name=U1EieteEGwm6N1dGszqCpA%3D%3D").toURL(),
|
||||||
|
null, null, null);
|
||||||
|
assertEquals("Object", fileName);
|
||||||
|
|
||||||
fileName = AbstractRipper.getFileName(new URI("http://www.test.com/file.png").toURL(), null,null, null);
|
fileName = AbstractRipper.getFileName(new URI("http://www.test.com/file.png").toURL(),
|
||||||
assertEquals("file.png", fileName);
|
null, null, null);
|
||||||
|
assertEquals("file.png", fileName);
|
||||||
fileName = AbstractRipper.getFileName(new URI("http://www.test.com/file.").toURL(), null,null, null);
|
|
||||||
assertEquals("file.", fileName);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
fileName = AbstractRipper.getFileName(new URI("http://www.test.com/file.").toURL(),
|
||||||
|
null, null, null);
|
||||||
|
assertEquals("file.", fileName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user