diff --git a/core-java-modules/core-java-20/src/test/java/com/baeldung/convertpaths/RelativePathConverterUnitTest.java b/core-java-modules/core-java-20/src/test/java/com/baeldung/convertpaths/RelativePathConverterUnitTest.java index 1573611697..80f61d45c9 100644 --- a/core-java-modules/core-java-20/src/test/java/com/baeldung/convertpaths/RelativePathConverterUnitTest.java +++ b/core-java-modules/core-java-20/src/test/java/com/baeldung/convertpaths/RelativePathConverterUnitTest.java @@ -5,40 +5,45 @@ import org.junit.Test; public class RelativePathConverterUnitTest { @Test - public void testConvertToAbsolutePath() { + public void givenRelativePath_whenConvertingToAbsolutePath_thenPrintOutput() { String relativePath = "data/sample.txt"; + System.out.println(RelativePathConverter.convertToAbsoluteUsePathsClass(relativePath)); System.out.println(RelativePathConverter.convertToAbsoluteUseFileClass(relativePath)); System.out.println(RelativePathConverter.convertToAbsoluteUseFileSystemsClass(relativePath)); } @Test - public void testConvertToAbsolutePath_withAbsolutePath() { + public void givenAbsolutePath_whenConvertingToAbsolutePath_thenPrintOutput() { String absolutePath = "/var/www/index.html"; + System.out.println(RelativePathConverter.convertToAbsoluteUsePathsClass(absolutePath)); System.out.println(RelativePathConverter.convertToAbsoluteUseFileClass(absolutePath)); System.out.println(RelativePathConverter.convertToAbsoluteUseFileSystemsClass(absolutePath)); } @Test - public void testConvertToAbsolutePath_withEmptyPath() { + public void givenEmptyPath_whenConvertingToAbsolutePath_thenPrintOutput() { String emptyPath = ""; + System.out.println(RelativePathConverter.convertToAbsoluteUsePathsClass(emptyPath)); System.out.println(RelativePathConverter.convertToAbsoluteUseFileClass(emptyPath)); System.out.println(RelativePathConverter.convertToAbsoluteUseFileSystemsClass(emptyPath)); } @Test - public void testConvertToAbsolutePath_withParentDirectory() { + public void givenParentDirectoryPath_whenConvertingToAbsolutePath_thenPrintOutput() { String relativePath = "../data/sample.txt"; + System.out.println(RelativePathConverter.convertToAbsoluteUsePathsClass(relativePath)); System.out.println(RelativePathConverter.convertToAbsoluteUseFileClass(relativePath)); System.out.println(RelativePathConverter.convertToAbsoluteUseFileSystemsClass(relativePath)); } @Test - public void testConvertToAbsolutePath_withRelativePathContainingDots() { + public void givenRelativePathContainingDots_whenConvertingToAbsolutePath_thenPrintOutput() { String relativePath = "././data/sample.txt"; + System.out.println(RelativePathConverter.convertToAbsoluteUsePathsClass(relativePath)); System.out.println(RelativePathConverter.convertToAbsoluteUseFileClass(relativePath)); System.out.println(RelativePathConverter.convertToAbsoluteUseFileSystemsClass(relativePath));