Esempio n. 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);
  }
Esempio n. 2
0
 @Test(expected = RuntimeException.class)
 public void testInvalidDate() {
   DateUtil.fromZulu("2011-02-23T14:35:42.005");
 }
Esempio n. 3
0
  @Test
  public void testWithMillis() {
    Date parsed = DateUtil.fromZulu("2011-02-23T14:35:42.005Z");

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