File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 8
8
import static camp .nextstep .edu .missionutils .test .Assertions .assertRandomUniqueNumbersInRangeTest ;
9
9
import static camp .nextstep .edu .missionutils .test .Assertions .assertSimpleTest ;
10
10
import static org .assertj .core .api .Assertions .assertThat ;
11
+ import static org .assertj .core .api .Assertions .assertThatThrownBy ;
11
12
12
13
class ApplicationTest extends NsTest {
13
14
private static final String ERROR_MESSAGE = "[ERROR]" ;
@@ -48,10 +49,9 @@ class ApplicationTest extends NsTest {
48
49
49
50
@ Test
50
51
void 예외_테스트 () {
51
- assertSimpleTest (() -> {
52
- runException ("1000j" );
53
- assertThat (output ()).contains (ERROR_MESSAGE );
54
- });
52
+ assertSimpleTest (() -> assertThatThrownBy (() -> runException ("1000j" ))
53
+ .isInstanceOf (IllegalArgumentException .class )
54
+ );
55
55
}
56
56
57
57
@ Override
You can’t perform that action at this time.
0 commit comments