use of org.ff4j.property.PropertyCalendar in project ff4j by ff4j.
the class PropertyTest method tesInitPropertyCalendar2.
@Test(expected = IllegalArgumentException.class)
public void tesInitPropertyCalendar2() {
PropertyCalendar d0 = new PropertyCalendar();
d0.fromString("invalid");
}
use of org.ff4j.property.PropertyCalendar in project ff4j by ff4j.
the class PropertyTest method tesInitPropertyCalendar.
@Test
public void tesInitPropertyCalendar() {
PropertyCalendar d0 = new PropertyCalendar();
PropertyCalendar d1 = new PropertyCalendar("d1");
PropertyCalendar d2 = new PropertyCalendar("d2", "2015-01-02 13:00");
PropertyCalendar d3 = new PropertyCalendar("d3", Calendar.getInstance());
Assert.assertNotNull(d1.getName());
Assert.assertNotNull(d2.getName());
Assert.assertNotNull(d3.getName());
d3.asString();
d0.setName("d0");
d0.fromString("2015-01-02 13:00");
d0.setDescription("OK");
d0.setType(PropertyCalendar.class.getName());
Assert.assertNotNull(d0.toJson());
Calendar cc = null;
PropertyCalendar d4 = new PropertyCalendar("d4", cc);
Assert.assertNull(d4.asString());
}
Aggregations