Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 50755b7 commit c0e4bf3Copy full SHA for c0e4bf3
caching/src/test/java/com/iluwatar/caching/AppTest.java
@@ -28,6 +28,7 @@
28
import java.io.IOException;
29
30
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
31
+import static org.junit.jupiter.api.Assertions.assertThrows;
32
33
/**
34
* Tests that Caching example runs without errors.
@@ -43,7 +44,14 @@ class AppTest {
43
44
45
@Test
46
void shouldExecuteApplicationWithoutException() {
-
47
assertDoesNotThrow(() -> App.main(new String[]{}));
48
}
49
+
50
+ @Test
51
+ void executeAppWithException(){
52
+ assertThrows(
53
+ NoClassDefFoundError.class,
54
+ () -> App.main(new String[]{"--mongo"})
55
+ );
56
+ }
57
0 commit comments