Example #1
0
  public void testLastModifiedDatePrefersReleasedDateIfNoChanges() throws Exception {
    a3.setReleasedDate(DateTools.createDate(2007, Calendar.OCTOBER, 20));
    a3.addDelta(new EpochDelta());

    assertDayOfDate(2007, Calendar.OCTOBER, 20, a3.getLastModifiedDate());
  }
Example #2
0
  public void testLastModifiedDatePrefersUpdatedDateIfReleasedDateNull() throws Exception {
    a3.setReleasedDate(null);
    ensureUpdatedDate(a3, DateTools.createDate(2007, Calendar.OCTOBER, 20));

    assertDayOfDate(2007, Calendar.OCTOBER, 20, a3.getLastModifiedDate());
  }
Example #3
0
  public void testLastModifiedDatePrefersReleasedDateIfNoDeltas() throws Exception {
    a3.setReleasedDate(DateTools.createDate(2007, Calendar.OCTOBER, 20));
    a3.getDeltas().clear();

    assertDayOfDate(2007, Calendar.OCTOBER, 20, a3.getLastModifiedDate());
  }
Example #4
0
  public void testLastModifiedDateIsNullIfAllDatesAreNull() throws Exception {
    a3.setReleasedDate(null);
    ensureUpdatedDate(a3, null);

    assertNull(a3.getLastModifiedDate());
  }