From b32406042fd7ee2cf9e3c50d9e186a002f4857c7 Mon Sep 17 00:00:00 2001 From: MetaPrime Date: Mon, 6 Jan 2025 00:24:09 -0800 Subject: [PATCH] AbstractRipperTest.java - format, organize imports --- .../ripme/tst/AbstractRipperTest.java | 40 +++++++++++-------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/src/test/java/com/rarchives/ripme/tst/AbstractRipperTest.java b/src/test/java/com/rarchives/ripme/tst/AbstractRipperTest.java index 7eb3df43..496cfd95 100644 --- a/src/test/java/com/rarchives/ripme/tst/AbstractRipperTest.java +++ b/src/test/java/com/rarchives/ripme/tst/AbstractRipperTest.java @@ -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); + } }