@@ -0,0 +1,1498 @@
+package seedu.doit.logic;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertFalse;%0A%0Aimport java.time.LocalDateTime;%0Aimport java.util.Optional;%0A%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.rules.ExpectedException;%0A%0Aimport seedu.doit.logic.parser.DateTimeParser;%0A%0A/**%0A * Tests if DateTimeParser is parsing the date correctly%0A **/%0A%0Apublic class DateTimeParserTest %7B%0A%0A    @Rule%0A    public ExpectedException thrown = ExpectedException.none();%0A    private void assertSameDate(LocalDateTime time1, LocalDateTime time2) %7B%0A        LocalDateTime diff = time1.minusHours(time2.getHour()).minusMinutes(time2.getMinute()).minusSeconds(time2.getSecond());%0A        assertEquals(time1, diff);%0A    %7D%0A%0A    @Test%0A    public void check_ifDateParsedCorrectly() throws Exception %7B%0A        Optional%3CLocalDateTime%3E t = DateTimeParser.parseDateTime(%2203/20/17%22);%0A        assertSameDate(t.get(), LocalDateTime.of(2017, 3, 20, 0, 0));%0A    %7D%0A%0A    @Test%0A    public void parseEmptyString() %7B%0A        Optional%3CLocalDateTime%3E dateParsed = DateTimeParser.parseDateTime(%22%22);%0A        assertFalse(dateParsed.isPresent());%0A    %7D%0A%0A    @Test%0A    public void parseNullString() throws Exception %7B%0A        thrown.expect(NullPointerException.class);%0A        DateTimeParser.parseDateTime(null);%0A    %7D%0A%0A    @Test%0A    public void parseRubbishString() %7B%0A        Optional%3CLocalDateTime%3E dateParsed = DateTimeParser.parseDateTime(%22jsadf%22);%0A        assertFalse(dateParsed.isPresent());%0A    %7D%0A%0A%0A%0A%7D%0A

Add DateTimeParserTest