Skip to content

Commit 5e7a559

Browse files
committed
test:테스트 케이스 추가
1 parent c7a6f7f commit 5e7a559

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/test/java/calculator/ApplicationTest.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ public void runMain() {
6161
});
6262
}
6363

64+
@Test
65+
public void 마침표_사용(){
66+
assertThatThrownBy(() -> runException("1.2.3:4"))
67+
.isInstanceOf(IllegalArgumentException.class);
68+
}
69+
6470
@Test
6571
public void 따옴표_구분자_사용() {
6672
assertSimpleTest(() -> {
@@ -76,4 +82,12 @@ public void runMain() {
7682
assertThat(output()).contains("결과 : 3");
7783
});
7884
}
85+
86+
@Test
87+
public void 문자열_없음(){
88+
assertSimpleTest(() -> {
89+
run("\n");
90+
assertThat(output()).contains("결과 : 0");
91+
});
92+
}
7993
}

0 commit comments

Comments
 (0)