Skip to content

Commit c295a58

Browse files
committed
Fail if expected Exception not thrown
1 parent 419ad3e commit c295a58

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/test/java/org/apache/commons/io/monitor/FileAlterationMonitorTestCase.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ public void testMonitor() {
102102

103103
try {
104104
monitor.start(); // try and start again
105+
fail("Expected IllegalStateException");
105106
} catch (final IllegalStateException e) {
106107
// expected result, monitor already running
107108
}
@@ -129,6 +130,7 @@ public void testMonitor() {
129130

130131
try {
131132
monitor.stop(); // try and stop again
133+
fail("Expected IllegalStateException");
132134
} catch (final IllegalStateException e) {
133135
// expected result, monitor already stopped
134136
}

0 commit comments

Comments
 (0)