mirror of
https://github.com/RipMeApp/ripme.git
synced 2025-01-16 20:28:15 +01:00
AbstractRipperTest.java - format, organize imports
This commit is contained in:
parent
92579d6179
commit
b32406042f
@ -1,33 +1,39 @@
|
||||
package com.rarchives.ripme.tst;
|
||||
|
||||
import com.rarchives.ripme.ripper.AbstractRipper;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
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 {
|
||||
|
||||
@Test
|
||||
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");
|
||||
assertEquals("test.test", fileName);
|
||||
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");
|
||||
assertEquals("test.test", fileName);
|
||||
|
||||
fileName = AbstractRipper.getFileName(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, "test", null);
|
||||
assertEquals("test", fileName);
|
||||
|
||||
fileName = AbstractRipper.getFileName(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.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);
|
||||
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.png").toURL(),
|
||||
null, null, null);
|
||||
assertEquals("file.png", fileName);
|
||||
|
||||
fileName = AbstractRipper.getFileName(new URI("http://www.test.com/file.").toURL(),
|
||||
null, null, null);
|
||||
assertEquals("file.", fileName);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user