File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1
1
package seedu .duke ;
2
2
3
3
import static org .junit .jupiter .api .Assertions .assertTrue ;
4
+ import static org .junit .jupiter .api .Assertions .assertFalse ;
4
5
5
6
import org .junit .jupiter .api .Test ;
7
+ import seedu .duke .flashcard .FlashcardComponent ;
8
+ import seedu .duke .flashcard .command .UnknownCommand ;
9
+
10
+ import java .util .ArrayList ;
6
11
7
12
class DukeTest {
8
13
@ Test
9
14
public void sampleTest () {
10
15
assertTrue (true );
11
16
}
17
+
18
+ @ Test
19
+ public void testFlashcardComponent_isResponsible_notResponsible () {
20
+ FlashcardComponent flashcardComponent = new FlashcardComponent (
21
+ new ArrayList <>());
22
+
23
+ assertFalse (flashcardComponent .isResponsible ("dfdfdfdfdf" ));
24
+ assertFalse (flashcardComponent .isResponsible ("help me" ));
25
+ assertFalse (flashcardComponent .isResponsible (" " ));
26
+ }
27
+
28
+ @ Test
29
+ public void testFlashcardComponent_isResponsible_responsible () {
30
+ FlashcardComponent flashcardComponent = new FlashcardComponent (
31
+ new ArrayList <>());
32
+
33
+ assertTrue (flashcardComponent .isResponsible ("create flashcard" ));
34
+ assertTrue (flashcardComponent .isResponsible ("create flashcard " ));
35
+ assertTrue (flashcardComponent .isResponsible ("list flashcards" ));
36
+ }
12
37
}
You can’t perform that action at this time.
0 commit comments