From e6ff0cd990d30d21544f33f9c38df7f223c664e6 Mon Sep 17 00:00:00 2001 From: Lukasz Rys <> Date: Mon, 14 Oct 2019 00:25:27 +0200 Subject: [PATCH] [ BAEL-3322 ] : Fix test name --- ...rTest.java => FilePathReaderUnitTest.java} | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) rename testing-modules/mocks/src/test/java/com/baeldung/jimfs/{FilePathReaderTest.java => FilePathReaderUnitTest.java} (51%) diff --git a/testing-modules/mocks/src/test/java/com/baeldung/jimfs/FilePathReaderTest.java b/testing-modules/mocks/src/test/java/com/baeldung/jimfs/FilePathReaderUnitTest.java similarity index 51% rename from testing-modules/mocks/src/test/java/com/baeldung/jimfs/FilePathReaderTest.java rename to testing-modules/mocks/src/test/java/com/baeldung/jimfs/FilePathReaderUnitTest.java index 8a52bd3443..e5326fc84c 100644 --- a/testing-modules/mocks/src/test/java/com/baeldung/jimfs/FilePathReaderTest.java +++ b/testing-modules/mocks/src/test/java/com/baeldung/jimfs/FilePathReaderUnitTest.java @@ -11,19 +11,19 @@ import java.nio.file.Path; import static org.junit.jupiter.api.Assertions.assertEquals; -class FilePathReaderTest { +class FilePathReaderUnitTest { - private static String DIRECTORY_NAME = "baeldung"; + private static final String DIRECTORY_NAME = "baeldung"; - private FilePathReader filePathReader = new FilePathReader(); + private final FilePathReader filePathReader = new FilePathReader(); @Test @DisplayName("Should get path on windows") void shouldGetPath_onWindows() throws Exception { - FileSystem fileSystem = Jimfs.newFileSystem(Configuration.windows()); - Path path = getPathToFile(fileSystem); + final FileSystem fileSystem = Jimfs.newFileSystem(Configuration.windows()); + final Path path = getPathToFile(fileSystem); - String stringPath = filePathReader.getSystemPath(path); + final String stringPath = filePathReader.getSystemPath(path); assertEquals("C:\\work\\" + DIRECTORY_NAME, stringPath); } @@ -31,16 +31,16 @@ class FilePathReaderTest { @Test @DisplayName("Should get path on unix") void shouldGetPath_onUnix() throws Exception { - FileSystem fileSystem = Jimfs.newFileSystem(Configuration.unix()); - Path path = getPathToFile(fileSystem); + final FileSystem fileSystem = Jimfs.newFileSystem(Configuration.unix()); + final Path path = getPathToFile(fileSystem); - String stringPath = filePathReader.getSystemPath(path); + final String stringPath = filePathReader.getSystemPath(path); assertEquals("/work/" + DIRECTORY_NAME, stringPath); } - private Path getPathToFile(FileSystem fileSystem) throws Exception { - Path path = fileSystem.getPath(DIRECTORY_NAME); + private Path getPathToFile(final FileSystem fileSystem) throws Exception { + final Path path = fileSystem.getPath(DIRECTORY_NAME); Files.createDirectory(path); return path;