Skip to content

Commit 8848d98

Browse files
Egima profilepivovarit
authored andcommitted
FileTest names fixed with phrase method/API changes (eugenp#801)
* made changes to java reflection * removed redundant method makeSound in Animal abstract class * added project for play-framework article * added project for regex * changed regex project from own model to core-java * added project for routing in play * made changes to regex project * refactored code for REST API with Play project * refactored student store indexing to zero base * added unit tests, removed bad names * added NIO Selector project under core-java module * requested changes made * added project for nio2 * standardized exception based tests * fixed exception based tests * removed redundant files * added network interface project * used UUID other than timestamps * fixed network interface tests * removed filetest change * made changes to NIO2 FileTest names
1 parent 8ce7e1f commit 8848d98

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

‎core-java/src/test/java/com/baeldung/java/nio2/FileTest.java‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public void givenNonexistentPath_whenConfirmsFileNotExists_thenCorrect() {
3232
}
3333

3434
@Test
35-
public void givenExistentDirPath_whenConfirmsNotRegularFile_thenCorrect() {
35+
public void givenDirPath_whenConfirmsNotRegularFile_thenCorrect() {
3636
Path p = Paths.get(HOME);
3737
assertFalse(Files.isRegularFile(p));
3838
}
@@ -118,7 +118,7 @@ public void givenFilePath_whenCreatesTempFile_thenCorrect() throws IOException {
118118
}
119119

120120
@Test
121-
public void givenFilePath_whenCreatesTempFileWithDefaultsNaming_thenCorrect() throws IOException {
121+
public void givenPath_whenCreatesTempFileWithDefaults_thenCorrect() throws IOException {
122122
Path p = Paths.get(HOME + "/");
123123
p = Files.createTempFile(p, null, null);
124124
// like 8600179353689423985.tmp
@@ -161,7 +161,9 @@ public void givenPath_whenFailsToDeleteNonEmptyDir_thenCorrect() throws IOExcept
161161
@Test(expected = NoSuchFileException.class)
162162
public void givenInexistentFile_whenDeleteFails_thenCorrect() throws IOException {
163163
Path p = Paths.get(HOME + "/inexistentFile.txt");
164+
assertFalse(Files.exists(p));
164165
Files.delete(p);
166+
165167
}
166168

167169
@Test

0 commit comments

Comments
 (0)