Beispiel #1
0
 public Employment(String organization, Date startDate, Date endDate) {
   this.organization = organization;
   this.startDate = new Date(startDate.getMonth(), startDate.getDay(), startDate.getYear());
   this.endDate = null;
   if (endDate != null) {
     this.endDate = new Date(endDate.getMonth(), endDate.getDay(), endDate.getYear());
   }
 }
Beispiel #2
0
 @Test
 public void testValidDay29_2_1996() throws DateException {
   validDate = new Date(29, 2, 1996);
   assertEquals(new Integer(29), validDate.getDay());
 }
Beispiel #3
0
 @Test
 public void testValidDay28_2_1995() throws DateException {
   validDate = new Date(28, 2, 1995);
   assertEquals(new Integer(28), validDate.getDay());
 }
Beispiel #4
0
  @Test
  public void testDayValid() throws DateException {

    assertEquals(new Integer(4), validDate.getDay());
  }
Beispiel #5
0
 @Test
 public void testMonthValid() throws DateException {
   assertEquals(new Integer(8), validDate.getMonth());
 }
Beispiel #6
0
  /**
   * Valid entries
   *
   * @throws DateException
   */
  @Test
  public void testYearValid() throws DateException {

    assertEquals(new Integer(1995), validDate.getYear());
  }