Search in sources :

Example 11 with InMemoryPropertyStore

use of org.ff4j.property.store.InMemoryPropertyStore in project ff4j by ff4j.

the class FF4JConfigurationTest method initCommonsConfWithFF4j.

@Before
public void initCommonsConfWithFF4j() throws ConfigurationException {
    pStore = new InMemoryPropertyStore("ff4j-configuration.xml");
    ff4jConf = new FF4jConfiguration();
    ff4jConf.setFf4jStore(pStore);
}
Also used : InMemoryPropertyStore(org.ff4j.property.store.InMemoryPropertyStore) Before(org.junit.Before)

Example 12 with InMemoryPropertyStore

use of org.ff4j.property.store.InMemoryPropertyStore in project ff4j by ff4j.

the class FF4JConfigurationTest method testgetKeysNull.

@Test
public void testgetKeysNull() {
    // Given
    InMemoryPropertyStore tmpStore = new InMemoryPropertyStore();
    Configuration tmpConf = new FF4jConfiguration(tmpStore);
    Iterator<String> propsKeys = tmpConf.getKeys("z");
    Assert.assertFalse(propsKeys.hasNext());
    tmpStore.setProperties(null);
    Assert.assertFalse(tmpConf.getKeys().hasNext());
    Assert.assertFalse(tmpConf.getKeys("z").hasNext());
}
Also used : InMemoryPropertyStore(org.ff4j.property.store.InMemoryPropertyStore) Configuration(org.apache.commons.configuration.Configuration) Test(org.junit.Test)

Example 13 with InMemoryPropertyStore

use of org.ff4j.property.store.InMemoryPropertyStore in project ff4j by ff4j.

the class AbstractStepDef method clearPropertyStore.

protected void clearPropertyStore() {
    ff4j.setFeatureStore(new InMemoryFeatureStore());
    ff4j.setPropertiesStore(new InMemoryPropertyStore());
}
Also used : InMemoryPropertyStore(org.ff4j.property.store.InMemoryPropertyStore) InMemoryFeatureStore(org.ff4j.store.InMemoryFeatureStore)

Example 14 with InMemoryPropertyStore

use of org.ff4j.property.store.InMemoryPropertyStore in project ff4j by ff4j.

the class AbstractStepDef method clearFeatureStore.

protected void clearFeatureStore() {
    ff4j.setFeatureStore(new InMemoryFeatureStore());
    ff4j.setPropertiesStore(new InMemoryPropertyStore());
}
Also used : InMemoryPropertyStore(org.ff4j.property.store.InMemoryPropertyStore) InMemoryFeatureStore(org.ff4j.store.InMemoryFeatureStore)

Example 15 with InMemoryPropertyStore

use of org.ff4j.property.store.InMemoryPropertyStore in project ff4j by ff4j.

the class AbstractStepDef method clearPropertyStore.

protected void clearPropertyStore() {
    ff4j.setPropertiesStore(new InMemoryPropertyStore());
    ff4j.setFeatureStore(new InMemoryFeatureStore());
}
Also used : InMemoryPropertyStore(org.ff4j.property.store.InMemoryPropertyStore) InMemoryFeatureStore(org.ff4j.store.InMemoryFeatureStore)

Aggregations

InMemoryPropertyStore (org.ff4j.property.store.InMemoryPropertyStore)41 Test (org.junit.Test)28 InMemoryFeatureStore (org.ff4j.store.InMemoryFeatureStore)10 PropertyString (org.ff4j.property.PropertyString)8 Property (org.ff4j.property.Property)6 PropertyStore (org.ff4j.property.store.PropertyStore)6 InputStream (java.io.InputStream)4 Before (org.junit.Before)4 FF4j (org.ff4j.FF4j)3 FF4jCacheProxy (org.ff4j.cache.FF4jCacheProxy)3 InMemoryCacheManager (org.ff4j.cache.InMemoryCacheManager)3 AbstractPollingScheduler (com.netflix.config.AbstractPollingScheduler)2 DynamicConfiguration (com.netflix.config.DynamicConfiguration)2 FixedDelayPollingScheduler (com.netflix.config.FixedDelayPollingScheduler)2 PolledConfigurationSource (com.netflix.config.PolledConfigurationSource)2 HashSet (java.util.HashSet)2 FF4JCacheManager (org.ff4j.cache.FF4JCacheManager)2 Feature (org.ff4j.core.Feature)2 BeforeClass (org.junit.BeforeClass)2 ClientResponse (com.sun.jersey.api.client.ClientResponse)1