Пример #1
0
  @Test
  public void testWithSeconds() {
    Date parsed = DateUtil.fromZulu("2011-02-23T14:35:42Z");

    Calendar calendar = setupCalendar();
    calendar.clear(Calendar.MILLISECOND);

    Assert.assertEquals(calendar.getTime(), parsed);
  }
Пример #2
0
 @Test(expected = RuntimeException.class)
 public void testInvalidDate() {
   DateUtil.fromZulu("2011-02-23T14:35:42.005");
 }
Пример #3
0
  @Test
  public void testWithMillis() {
    Date parsed = DateUtil.fromZulu("2011-02-23T14:35:42.005Z");

    Assert.assertEquals(setupCalendar().getTime(), parsed);
  }