Package com.gitblit.utils

Examples of com.gitblit.utils.TimeUtils.duration()


  }

  @Test
  public void testDurations() throws Exception {
    TimeUtils timeUtils = new TimeUtils();
    assertEquals("1 day", timeUtils.duration(1));
    assertEquals("5 days", timeUtils.duration(5));
    assertEquals("3 months", timeUtils.duration(75));
    assertEquals("12 months", timeUtils.duration(364));
    assertEquals("1 year", timeUtils.duration(365 + 0));
    assertEquals("1 year", timeUtils.duration(365 + 10));
View Full Code Here


  @Test
  public void testDurations() throws Exception {
    TimeUtils timeUtils = new TimeUtils();
    assertEquals("1 day", timeUtils.duration(1));
    assertEquals("5 days", timeUtils.duration(5));
    assertEquals("3 months", timeUtils.duration(75));
    assertEquals("12 months", timeUtils.duration(364));
    assertEquals("1 year", timeUtils.duration(365 + 0));
    assertEquals("1 year", timeUtils.duration(365 + 10));
    assertEquals("1 year, 1 month", timeUtils.duration(365 + 15));
View Full Code Here

  @Test
  public void testDurations() throws Exception {
    TimeUtils timeUtils = new TimeUtils();
    assertEquals("1 day", timeUtils.duration(1));
    assertEquals("5 days", timeUtils.duration(5));
    assertEquals("3 months", timeUtils.duration(75));
    assertEquals("12 months", timeUtils.duration(364));
    assertEquals("1 year", timeUtils.duration(365 + 0));
    assertEquals("1 year", timeUtils.duration(365 + 10));
    assertEquals("1 year, 1 month", timeUtils.duration(365 + 15));
    assertEquals("1 year, 1 month", timeUtils.duration(365 + 30));
View Full Code Here

  public void testDurations() throws Exception {
    TimeUtils timeUtils = new TimeUtils();
    assertEquals("1 day", timeUtils.duration(1));
    assertEquals("5 days", timeUtils.duration(5));
    assertEquals("3 months", timeUtils.duration(75));
    assertEquals("12 months", timeUtils.duration(364));
    assertEquals("1 year", timeUtils.duration(365 + 0));
    assertEquals("1 year", timeUtils.duration(365 + 10));
    assertEquals("1 year, 1 month", timeUtils.duration(365 + 15));
    assertEquals("1 year, 1 month", timeUtils.duration(365 + 30));
    assertEquals("1 year, 1 month", timeUtils.duration(365 + 44));
View Full Code Here

    TimeUtils timeUtils = new TimeUtils();
    assertEquals("1 day", timeUtils.duration(1));
    assertEquals("5 days", timeUtils.duration(5));
    assertEquals("3 months", timeUtils.duration(75));
    assertEquals("12 months", timeUtils.duration(364));
    assertEquals("1 year", timeUtils.duration(365 + 0));
    assertEquals("1 year", timeUtils.duration(365 + 10));
    assertEquals("1 year, 1 month", timeUtils.duration(365 + 15));
    assertEquals("1 year, 1 month", timeUtils.duration(365 + 30));
    assertEquals("1 year, 1 month", timeUtils.duration(365 + 44));
    assertEquals("1 year, 2 months", timeUtils.duration(365 + 45));
View Full Code Here

    assertEquals("1 day", timeUtils.duration(1));
    assertEquals("5 days", timeUtils.duration(5));
    assertEquals("3 months", timeUtils.duration(75));
    assertEquals("12 months", timeUtils.duration(364));
    assertEquals("1 year", timeUtils.duration(365 + 0));
    assertEquals("1 year", timeUtils.duration(365 + 10));
    assertEquals("1 year, 1 month", timeUtils.duration(365 + 15));
    assertEquals("1 year, 1 month", timeUtils.duration(365 + 30));
    assertEquals("1 year, 1 month", timeUtils.duration(365 + 44));
    assertEquals("1 year, 2 months", timeUtils.duration(365 + 45));
    assertEquals("1 year, 2 months", timeUtils.duration(365 + 60));
View Full Code Here

    assertEquals("5 days", timeUtils.duration(5));
    assertEquals("3 months", timeUtils.duration(75));
    assertEquals("12 months", timeUtils.duration(364));
    assertEquals("1 year", timeUtils.duration(365 + 0));
    assertEquals("1 year", timeUtils.duration(365 + 10));
    assertEquals("1 year, 1 month", timeUtils.duration(365 + 15));
    assertEquals("1 year, 1 month", timeUtils.duration(365 + 30));
    assertEquals("1 year, 1 month", timeUtils.duration(365 + 44));
    assertEquals("1 year, 2 months", timeUtils.duration(365 + 45));
    assertEquals("1 year, 2 months", timeUtils.duration(365 + 60));
View Full Code Here

    assertEquals("3 months", timeUtils.duration(75));
    assertEquals("12 months", timeUtils.duration(364));
    assertEquals("1 year", timeUtils.duration(365 + 0));
    assertEquals("1 year", timeUtils.duration(365 + 10));
    assertEquals("1 year, 1 month", timeUtils.duration(365 + 15));
    assertEquals("1 year, 1 month", timeUtils.duration(365 + 30));
    assertEquals("1 year, 1 month", timeUtils.duration(365 + 44));
    assertEquals("1 year, 2 months", timeUtils.duration(365 + 45));
    assertEquals("1 year, 2 months", timeUtils.duration(365 + 60));

    assertEquals("2 years", timeUtils.duration(2 * 365 + 0));
View Full Code Here

    assertEquals("12 months", timeUtils.duration(364));
    assertEquals("1 year", timeUtils.duration(365 + 0));
    assertEquals("1 year", timeUtils.duration(365 + 10));
    assertEquals("1 year, 1 month", timeUtils.duration(365 + 15));
    assertEquals("1 year, 1 month", timeUtils.duration(365 + 30));
    assertEquals("1 year, 1 month", timeUtils.duration(365 + 44));
    assertEquals("1 year, 2 months", timeUtils.duration(365 + 45));
    assertEquals("1 year, 2 months", timeUtils.duration(365 + 60));

    assertEquals("2 years", timeUtils.duration(2 * 365 + 0));
    assertEquals("2 years", timeUtils.duration(2 * 365 + 10));
View Full Code Here

    assertEquals("1 year", timeUtils.duration(365 + 0));
    assertEquals("1 year", timeUtils.duration(365 + 10));
    assertEquals("1 year, 1 month", timeUtils.duration(365 + 15));
    assertEquals("1 year, 1 month", timeUtils.duration(365 + 30));
    assertEquals("1 year, 1 month", timeUtils.duration(365 + 44));
    assertEquals("1 year, 2 months", timeUtils.duration(365 + 45));
    assertEquals("1 year, 2 months", timeUtils.duration(365 + 60));

    assertEquals("2 years", timeUtils.duration(2 * 365 + 0));
    assertEquals("2 years", timeUtils.duration(2 * 365 + 10));
    assertEquals("2 years, 1 month", timeUtils.duration(2 * 365 + 15));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.