prj03-group06/src/tests/DateTest.java
@Test
	public void testYear() {
		String date = gui.getDate();
		String year = date.substring(19, 23);
		Date currentDate = new Date();
		String today = currentDate.toString();
		String currentYear = today.substring(today.length()-4, today.length());
		if (year.equals(currentYear)) {
			assertTrue(true);
		} else {
			fail("Year numbers don't match");
		}
	}
/**
	 * Test to get the year number
	 */
Test to get the year number
Test to get the year number
@Test
	public void testYear() {
		String date = gui.getDate();
		String year = date.substring(19, 23);
		Date currentDate = new Date();
		String today = currentDate.toString();
		String currentYear = today.substring(today.length()-4, today.length());
		if (year.equals(currentYear)) {
			assertTrue(true);
		} else {
			fail("Year numbers don't match");
		}
	}
@ Test public void testYear ( ) { String date = gui . getDate ( ) ; String year = date . substring ( 19 , 23 ) ; Date currentDate = new Date ( ) ; String today = currentDate . toString ( ) ; String currentYear = today . substring ( today . length ( ) - 4 , today . length ( ) ) ; if ( year . equals ( currentYear ) ) { assertTrue ( true ) ; } else { fail ( "Year numbers don't match" ) ; } }
Test to get the year number
Test to get the year number