Examples of DateTimeFunction


Examples of br.com.six2six.fixturefactory.function.impl.DateTimeFunction

  }

  @Test
  public void beforeDate() {
    String source = "2011-04-07";
    Calendar value = new DateTimeFunction(toCalendar(source, format), DateType.BEFORE).generateValue();
    assertNotNull("Generated date can not be null", value);
    assertTrue(String.format("Generated date is not before %s", source), value.before(toCalendar(source, format)));
  }
View Full Code Here

Examples of br.com.six2six.fixturefactory.function.impl.DateTimeFunction

    assertTrue(String.format("Generated date is not before %s", source), value.before(toCalendar(source, format)));
  }
  @Test
  public void randomDate() {
    String start = "2011-04-01", end = "2011-04-30";
    Calendar value = new DateTimeFunction(toCalendar(start, format), toCalendar(end, format)).generateValue();
    assertNotNull("Generated date can not be null", value);
    assertTrue(String.format("Generated date is not between %s and %s", start, end), toCalendar(start, format).before(value) && value.before(toCalendar(end, format)));
  }
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.