Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc0e4bf3

Browse files
committed
Add test
1 parent50755b7 commitc0e4bf3

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

‎caching/src/test/java/com/iluwatar/caching/AppTest.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
importjava.io.IOException;
2929

3030
importstaticorg.junit.jupiter.api.Assertions.assertDoesNotThrow;
31+
importstaticorg.junit.jupiter.api.Assertions.assertThrows;
3132

3233
/**
3334
* Tests that Caching example runs without errors.
@@ -43,7 +44,14 @@ class AppTest {
4344

4445
@Test
4546
voidshouldExecuteApplicationWithoutException() {
46-
4747
assertDoesNotThrow(() ->App.main(newString[]{}));
4848
}
49+
50+
@Test
51+
voidexecuteAppWithException(){
52+
assertThrows(
53+
NoClassDefFoundError.class,
54+
() ->App.main(newString[]{"--mongo"})
55+
);
56+
}
4957
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp