use of org.ff4j.property.PropertyDate in project ff4j by ff4j.
the class InMemoryPropertyStoreTest method testProperty.
public void testProperty() {
FF4j ff4j = new FF4j("ff4j.xml");
ff4j.getPropertiesStore().createProperty(new PropertyDate("property_3", new Date()));
Property<?> ap = ff4j.getPropertiesStore().readProperty("property_3");
PropertyDate pDate = (PropertyDate) ap;
pDate.setValue(new Date());
ff4j.getPropertiesStore().updateProperty(pDate);
ff4j.getPropertiesStore().deleteProperty("property_3");
Assert.assertFalse(testedStore.existProperty("property_3"));
}
use of org.ff4j.property.PropertyDate in project ff4j by ff4j.
the class PropertyTest method tesInitPropertyDate.
@Test
public void tesInitPropertyDate() {
PropertyDate d0 = new PropertyDate();
d0.fromString("2015-01-02 13:00:00");
PropertyDate d1 = new PropertyDate("d1");
Assert.assertNotNull(d1.getName());
PropertyDate d2 = new PropertyDate("d2", "2015-01-02 13:00:00");
Assert.assertNotNull(d2.getName());
Date dd = null;
PropertyDate d3 = new PropertyDate("d3", dd);
Assert.assertNull(d3.asString());
}
use of org.ff4j.property.PropertyDate in project ff4j by ff4j.
the class PropertyStoreJCacheTest method addPropertyOKDate.
/**
* TDD.
*/
@Test
public void addPropertyOKDate() {
// Given
// Assert.assertFalse(testedStore.exist("log"));
// When
testedStore.createProperty(new PropertyDate("ddate", new Date()));
// Then
Assert.assertTrue(testedStore.existProperty("ddate"));
}
Aggregations