@@ -0,0 +1,1735 @@
+package seedu.ezdo.logic.parser;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertTrue;%0Aimport static seedu.ezdo.logic.parser.DateParser.USER_DATE_OUTPUT_FORMAT;%0A%0Aimport java.text.DateFormat;%0Aimport java.text.SimpleDateFormat;%0Aimport java.util.Calendar;%0Aimport java.util.Date;%0A%0Aimport org.junit.Test;%0A%0A/**%0A * Tests the behaviour of the date parser%0A */%0Apublic class DateParserTest %7B%0A%0A    DateParser dateParser;%0A%0A    /**%0A     * Checks if dates in natural language are parsed correctly%0A     * @throws Exception%0A     */%0A    @Test%0A    public void checkNaturalParsing() throws Exception %7B%0A        DateFormat expectedFormat = new SimpleDateFormat(USER_DATE_OUTPUT_FORMAT);%0A        Date dt = new Date();%0A        Calendar c = Calendar.getInstance();%0A        c.setTime(dt);%0A%0A        dateParser = new DateParser(%22today%22);%0A        String expectedValue = expectedFormat.format(dt);%0A        assertTrue(expectedValue.equals(dateParser.value));%0A%0A        dateParser = new DateParser(%22tomorrow%22);%0A        c.add(Calendar.DATE, 1); // add 1 day to get tomorrow's date%0A        dt = c.getTime();%0A        expectedValue = expectedFormat.format(dt);%0A        assertTrue(expectedValue.equals(dateParser.value));%0A    %7D%0A%0A    /**%0A     * Checks if dates formatted in DD/MM/YYYY are parsed correctly%0A     */%0A    @Test%0A    public void checkFormatParsing() throws Exception %7B%0A        dateParser = new DateParser(%2231/12/2017 11:00%22);%0A        assertEquals(dateParser.value, %2231/12/2017 11:00%22);%0A%0A        dateParser = new DateParser(%221/1/2016 12:00%22);%0A        assertEquals(dateParser.value, %2201/01/2016 12:00%22);%0A%0A        dateParser = new DateParser(%2215/01/2016 00:00%22);%0A        assertEquals(dateParser.value, %2215/01/2016 00:00%22);%0A    %7D%0A%7D%0A

Add tests for date parser