[ BAEL-3322 ] : Change method test names

This commit is contained in:
Lukasz Rys
2019-10-18 19:40:55 +02:00
parent e6ff0cd990
commit ba4c7594a6
3 changed files with 8 additions and 8 deletions

View File

@@ -24,9 +24,9 @@ class FileManipulationUnitTest implements FileTestProvider {
}
@ParameterizedTest
@DisplayName("Should create a file on a file system")
@DisplayName("Should move file to new destination")
@MethodSource("provideFileSystem")
void shouldCreateFile(final FileSystem fileSystem) throws Exception {
void givenEachSystem_whenMovingFile_thenMovedToNewPath(final FileSystem fileSystem) throws Exception {
final Path origin = fileSystem.getPath(RESOURCE_FILE_NAME);
Files.copy(getResourceFilePath(), origin);
final Path destination = fileSystem.getPath("newDirectory", RESOURCE_FILE_NAME);

View File

@@ -19,7 +19,7 @@ class FilePathReaderUnitTest {
@Test
@DisplayName("Should get path on windows")
void shouldGetPath_onWindows() throws Exception {
void givenWindowsSystem_shouldGetPath_thenReturnWindowsPath() throws Exception {
final FileSystem fileSystem = Jimfs.newFileSystem(Configuration.windows());
final Path path = getPathToFile(fileSystem);
@@ -30,7 +30,7 @@ class FilePathReaderUnitTest {
@Test
@DisplayName("Should get path on unix")
void shouldGetPath_onUnix() throws Exception {
void givenUnixSystem_shouldGetPath_thenReturnUnixPath() throws Exception {
final FileSystem fileSystem = Jimfs.newFileSystem(Configuration.unix());
final Path path = getPathToFile(fileSystem);

View File

@@ -17,7 +17,7 @@ class FileRepositoryUnitTest implements FileTestProvider {
@Test
@DisplayName("Should create a file on a file system")
void shouldCreateFile() {
void givenUnixSystem_whenCreatingFile_thenCreatedInPath() {
final FileSystem fileSystem = Jimfs.newFileSystem(Configuration.unix());
final String fileName = "newFile.txt";
final Path pathToStore = fileSystem.getPath("");
@@ -29,7 +29,7 @@ class FileRepositoryUnitTest implements FileTestProvider {
@Test
@DisplayName("Should read the content of the file")
void shouldReadFileContent_thenReturnIt() throws Exception {
void givenOSXSystem_whenReadingFile_thenContentIsReturned() throws Exception {
final FileSystem fileSystem = Jimfs.newFileSystem(Configuration.osX());
final Path resourceFilePath = fileSystem.getPath(RESOURCE_FILE_NAME);
Files.copy(getResourceFilePath(), resourceFilePath);
@@ -41,7 +41,7 @@ class FileRepositoryUnitTest implements FileTestProvider {
@Test
@DisplayName("Should update the content of the file")
void shouldUpdateContentOfTheFile() throws Exception {
void givenWindowsSystem_whenUpdatingFile_thenContentHasChanged() throws Exception {
final FileSystem fileSystem = Jimfs.newFileSystem(Configuration.windows());
final Path resourceFilePath = fileSystem.getPath(RESOURCE_FILE_NAME);
Files.copy(getResourceFilePath(), resourceFilePath);
@@ -55,7 +55,7 @@ class FileRepositoryUnitTest implements FileTestProvider {
@Test
@DisplayName("Should delete file")
void shouldDeleteFile() throws Exception {
void givenRandomSystem_whenDeletingFile_thenFileHasBeenDeleted() throws Exception {
final FileSystem fileSystem = Jimfs.newFileSystem();
final Path resourceFilePath = fileSystem.getPath(RESOURCE_FILE_NAME);
Files.copy(getResourceFilePath(), resourceFilePath);