File tree Expand file tree Collapse file tree 1 file changed +27
-1
lines changed
Expand file tree Collapse file tree 1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change 1- package util ;public class ParserTest {
1+ package util ;
2+
3+ import duke .exception .EmptyDescriptionException ;
4+ import duke .exception .IncompleteDescriptionException ;
5+ import duke .util .Parser ;
6+ import org .junit .jupiter .api .Test ;
7+
8+ import static org .junit .jupiter .api .Assertions .assertEquals ;
9+ import static org .junit .jupiter .api .Assertions .assertThrows ;
10+
11+ public class ParserTest {
12+
13+ @ Test
14+ public void emptyCommandTest () {
15+ assertThrows (EmptyDescriptionException .class , () -> Parser .parse ("" ));
16+ }
17+
18+ @ Test
19+ public void incompleteCommandTest () {
20+ assertThrows (EmptyDescriptionException .class , () -> Parser .parse ("todo " ));
21+ }
22+
23+ @ Test
24+ public void allSpaceCommandTest () {
25+ assertThrows (EmptyDescriptionException .class , () -> Parser .parse (" " ));
26+ }
27+
228}
You can’t perform that action at this time.
0 commit comments