Skip to content

Commit

Permalink
test: 예외 테스트 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
seong-wooo committed Mar 28, 2023
1 parent 91f6c78 commit a308695
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/test/java/lotto/ApplicationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import static camp.nextstep.edu.missionutils.test.Assertions.assertRandomUniqueNumbersInRangeTest;
import static camp.nextstep.edu.missionutils.test.Assertions.assertSimpleTest;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy;

class ApplicationTest extends NsTest {
private static final String ERROR_MESSAGE = "[ERROR]";
Expand Down Expand Up @@ -48,10 +49,9 @@ class ApplicationTest extends NsTest {

@Test
void 예외_테스트() {
assertSimpleTest(() -> {
runException("1000j");
assertThat(output()).contains(ERROR_MESSAGE);
});
assertSimpleTest(() -> assertThatThrownBy(() -> runException("1000j"))
.isInstanceOf(IllegalArgumentException.class)
);
}

@Override
Expand Down

0 comments on commit a308695

Please sign in to comment.