Skip to content

Commit 1b1f8ae

Browse files
committed
Reworked test to fail if an exception is thrown.
1 parent fcab8bc commit 1b1f8ae

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

src/test/java/commands/MkdirTest.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ public void setUp() throws Exception {
2525

2626
@After
2727
public void tearDown() throws Exception {
28-
FileSystem.createFileSystemInstance();
2928
}
3029

3130
@Test
@@ -46,9 +45,8 @@ public void testExecuteCommandNewDir() {
4645
String output = commandExecutor.executeCommand(shellState, "mkdir test");
4746
FileSystem fileSystem = shellState.getFileSystem();
4847
Directory newDir = fileSystem.getDirectoryByPath(fileSystem.getRoot(), "test");
49-
assertNotNull(newDir);
5048
} catch (Exception e) {
51-
e.printStackTrace();
49+
fail("Could not retrieve new directory using getDirectoryByPath");
5250
}
5351
}
5452
}

0 commit comments

Comments
 (0)