Skip to content

Commit

Permalink
Simple A-JUnit
Browse files Browse the repository at this point in the history
  • Loading branch information
jiaax committed Aug 25, 2020
1 parent 7a41b8f commit 4496c0f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/Duke/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
public class Event extends Task {
protected LocalDate at;

Event(String description, String at) {
public Event(String description, String at) {
super(description);
this.at = LocalDate.parse(at);
}
Expand Down
25 changes: 25 additions & 0 deletions src/test/java/DukeTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import Duke.Deadline;
import Duke.Event;
import Duke.Task;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class DukeTest {
@Test
public void dummyTest(){
assertEquals(2, 2);
}

@Test
public void test1() {
Event e = new Event("dance", "2020-08-09");
assertEquals(e.inputStyle(), "event false dance /at 2020-08-09");
}

@Test
public void test2() {
Task e = new Deadline("finish ip ", "2020-08-25");
assertEquals(e.inputStyle(), "deadline false finish ip /by 2020-08-25");
}
}

0 comments on commit 4496c0f

Please sign in to comment.