Skip to content

Commit

Permalink
Add DeadlineTest.java, TodoTest.java & EventTest.java to test behavio…
Browse files Browse the repository at this point in the history
…r of

code
  • Loading branch information
Ryan Chang Jia Jie committed Feb 19, 2022
1 parent e2881fe commit de14c4b
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
Empty file.
11 changes: 11 additions & 0 deletions src/test/java/siri/DeadlineTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package siri;

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

public class DeadlineTest {
@Test
public void stringFormatTest(){
assertEquals("[D][ ] CS2103T Quiz 3 (by: May 20th)", new Deadline("CS2103T Quiz 3","D", "May 20th").toString());
}
}
11 changes: 11 additions & 0 deletions src/test/java/siri/EventTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package siri;

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

public class EventTest {
@Test
public void testStringConversion() {
assertEquals("[E][ ] Jane's Wedding (at: Oct 10th 2019)", new Event("Jane's Wedding", "E", "Oct 10th 2019").toString());
}
}
11 changes: 11 additions & 0 deletions src/test/java/siri/TodoTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package siri;

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

public class TodoTest {
@Test
public void testStringConversion() {
assertEquals("[T][ ] run 2.4km", new Todo("run 2.4km", "T").toString());
}
}

0 comments on commit de14c4b

Please sign in to comment.