Search in sources :

Example 1 with PropertyDate

use of org.ff4j.property.PropertyDate in project ff4j by ff4j.

the class PropertyStoreEhCacheTest method addPropertyOKDate.

/**
 * TDD.
 */
@Test
@Override
public void addPropertyOKDate() {
    // Given
    // Assert.assertFalse(testedStore.exist("log"));
    // When
    testedStore.createProperty(new PropertyDate("ddateee", new Date()));
    // Then
    Assert.assertTrue(testedStore.existProperty("ddateee"));
}
Also used : Date(java.util.Date) PropertyDate(org.ff4j.property.PropertyDate) PropertyDate(org.ff4j.property.PropertyDate) Test(org.junit.Test)

Example 2 with PropertyDate

use of org.ff4j.property.PropertyDate in project ff4j by ff4j.

the class PropertyTest method tesInitPropertyDate2.

@Test(expected = IllegalArgumentException.class)
public void tesInitPropertyDate2() {
    PropertyDate d0 = new PropertyDate();
    d0.fromString("invalid");
}
Also used : PropertyDate(org.ff4j.property.PropertyDate) Test(org.junit.Test)

Example 3 with PropertyDate

use of org.ff4j.property.PropertyDate in project ff4j by ff4j.

the class AbstractPropertyStoreJunitTest 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"));
}
Also used : Date(java.util.Date) PropertyDate(org.ff4j.property.PropertyDate) PropertyDate(org.ff4j.property.PropertyDate) Test(org.junit.Test)

Example 4 with PropertyDate

use of org.ff4j.property.PropertyDate in project ff4j by ff4j.

the class InMemoryPropertiesStoreTest 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");
}
Also used : FF4j(org.ff4j.FF4j) Date(java.util.Date) PropertyDate(org.ff4j.property.PropertyDate) PropertyDate(org.ff4j.property.PropertyDate)

Example 5 with PropertyDate

use of org.ff4j.property.PropertyDate in project ff4j by ff4j.

the class PropertyStoreTestSupport 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"));
}
Also used : Date(java.util.Date) PropertyDate(org.ff4j.property.PropertyDate) PropertyDate(org.ff4j.property.PropertyDate) Test(org.junit.Test)

Aggregations

PropertyDate (org.ff4j.property.PropertyDate)8 Date (java.util.Date)7 Test (org.junit.Test)6 FF4j (org.ff4j.FF4j)2