Пример #1
0
  @Test
  public void testFormatToolbarDate() {
    String actual = DateFormatUtil.formatToolbarDate("20100516");
    String expected = "05/16";

    assertEquals(expected, actual);
  }
Пример #2
0
  @Test
  public void testFormatToolbarDate_Today() {
    Calendar now = Calendar.getInstance();
    SimpleDateFormat format = new SimpleDateFormat("yyyyMMdd", Locale.US);

    String actual = DateFormatUtil.formatToolbarDate(format.format(now.getTime()));
    String expected = "Today";

    assertEquals(expected, actual);
  }