[ BAEL-3322 ] : Fix test name
This commit is contained in:
@@ -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;
|
||||
Reference in New Issue
Block a user