use of org.ff4j.property.PropertyLogLevel in project ff4j by ff4j.
the class PropertyStoreArchaiusCommonsConfTest method readOKFixed.
/**
* TDD.
*/
@Override
@Test
public void readOKFixed() {
// Given
testedStore.createProperty(new PropertyLogLevel(READ_OK_FIXED, LogLevel.ERROR));
// When
Property<?> log = testedStore.readProperty(READ_OK_FIXED);
// Then
Assert.assertNotNull(log);
Assert.assertNotNull(log.getName());
Assert.assertEquals(READ_OK_FIXED, log.getName());
Assert.assertEquals(LogLevel.ERROR.name(), log.getValue());
}
use of org.ff4j.property.PropertyLogLevel in project ff4j by ff4j.
the class PropertyStoreArchaiusCommonsConfTest method updateOK.
/**
* TDD.
*/
@Override
@Test
public void updateOK() {
// Given
testedStore.createProperty(new PropertyLogLevel(UPDATE_OK, LogLevel.ERROR));
// When
testedStore.updateProperty(UPDATE_OK, "INFO");
// Then
Assert.assertEquals("INFO", testedStore.readProperty(UPDATE_OK).getValue());
}
use of org.ff4j.property.PropertyLogLevel in project ff4j by ff4j.
the class PropertyStoreJCacheTest method addPropertyOKLogLevel.
/**
* TDD.
*/
@Test
public void addPropertyOKLogLevel() {
// Given
// Assert.assertFalse(testedStore.exist("log"));
// When
testedStore.createProperty(new PropertyLogLevel("logi", LogLevel.DEBUG));
// Then
Assert.assertTrue(testedStore.existProperty("logi"));
}
use of org.ff4j.property.PropertyLogLevel in project ff4j by ff4j.
the class PropertyStoreJCacheTest method readOKFixed.
@Test
public void readOKFixed() {
// Given
testedStore.createProperty(new PropertyLogLevel("readOKFixed", LogLevel.ERROR));
// When
Property<?> log = testedStore.readProperty("readOKFixed");
// Then
Assert.assertNotNull(log);
Assert.assertNotNull(log.getName());
Assert.assertEquals("readOKFixed", log.getName());
Assert.assertEquals(LogLevel.ERROR, log.getValue());
Assert.assertEquals("ERROR", log.asString());
Assert.assertNotNull(log.getFixedValues());
}
use of org.ff4j.property.PropertyLogLevel in project ff4j by ff4j.
the class PropertyStoreJCacheTest method updateKOInvalidValue.
/**
* TDD.
*/
@Test(expected = IllegalArgumentException.class)
public void updateKOInvalidValue() {
// Given
testedStore.createProperty(new PropertyLogLevel("updateKOInvalidValue", LogLevel.ERROR));
// When
testedStore.updateProperty("updateKOInvalidValue", "KO");
// Expected error
Assert.fail();
}
Aggregations