use of org.ff4j.property.PropertyLogLevel in project ff4j by ff4j.
the class AbstractPropertyStoreJunitTest method addPropertyOKLogLevel.
/**
* TDD.
*/
@Test
public void addPropertyOKLogLevel() {
// Given
// Assert.assertFalse(testedStore.exist("log"));
// When
testedStore.createProperty(new PropertyLogLevel("log", LogLevel.DEBUG));
// Then
Assert.assertTrue(testedStore.existProperty("log"));
}
use of org.ff4j.property.PropertyLogLevel in project ff4j by ff4j.
the class AbstractPropertyStoreJunitTest method updateKOInvalidValue.
/**
* TDD.
*/
@Test(expected = IllegalArgumentException.class)
public void updateKOInvalidValue() {
// Given
testedStore.createProperty(new PropertyLogLevel("log", LogLevel.ERROR));
// When
testedStore.updateProperty("log", "KO");
}
use of org.ff4j.property.PropertyLogLevel in project ff4j by ff4j.
the class AbstractPropertyStoreJunitTest method importPropertiesOK.
/**
* TDD.
*/
@Test
public void importPropertiesOK() {
// Given
Assert.assertNotNull(testedStore);
Assert.assertFalse(testedStore.existProperty("titi1"));
Assert.assertFalse(testedStore.existProperty("titi2"));
Assert.assertTrue(testedStore.existProperty("a"));
// When
Set<Property<?>> setOfProperty = new HashSet<Property<?>>();
setOfProperty.add(new PropertyLogLevel("a", LogLevel.INFO));
setOfProperty.add(new PropertyLogLevel("titi1", LogLevel.INFO));
setOfProperty.add(new PropertyLogLevel("titi2", LogLevel.INFO));
testedStore.importProperties(setOfProperty);
// Then
Assert.assertTrue(testedStore.existProperty("titi1"));
Assert.assertTrue(testedStore.existProperty("titi2"));
Assert.assertTrue(testedStore.existProperty("a"));
}
Aggregations