Search in sources :

Example 36 with InMemoryPropertyStore

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

the class InMemoryPropertiesStoreTest method testInitStores.

@Test
public void testInitStores() {
    new InMemoryPropertyStore(new HashMap<String, Property<?>>());
    InputStream in = getClass().getClassLoader().getResourceAsStream("ff4j.xml");
    new InMemoryPropertyStore(in);
}
Also used : InMemoryPropertyStore(org.ff4j.property.store.InMemoryPropertyStore) InputStream(java.io.InputStream) PropertyString(org.ff4j.property.PropertyString) Property(org.ff4j.property.Property) Test(org.junit.Test)

Example 37 with InMemoryPropertyStore

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

the class InMemoryPropertiesStoreTest method testInheritMethods.

@Test
public void testInheritMethods() {
    InMemoryPropertyStore ip = new InMemoryPropertyStore();
    ip.importPropertiesFromXmlFile("ff4j.xml");
    Assert.assertNotNull(ip.toJson());
    ip.isEmpty();
}
Also used : InMemoryPropertyStore(org.ff4j.property.store.InMemoryPropertyStore) Test(org.junit.Test)

Example 38 with InMemoryPropertyStore

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

the class InMemoryPropertiesStoreTest method testEmpty3.

@Test
public void testEmpty3() {
    // Given
    InMemoryPropertyStore ips = new InMemoryPropertyStore();
    ips.createProperty(new PropertyString("P1", "v1"));
    Assert.assertFalse(ips.isEmpty());
}
Also used : PropertyString(org.ff4j.property.PropertyString) InMemoryPropertyStore(org.ff4j.property.store.InMemoryPropertyStore) Test(org.junit.Test)

Example 39 with InMemoryPropertyStore

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

the class InMemoryPropertiesStoreTest method testListProperties.

@Test
public void testListProperties() {
    InMemoryPropertyStore ips = new InMemoryPropertyStore();
    ips.setProperties(null);
    Assert.assertNull(ips.listPropertyNames());
}
Also used : InMemoryPropertyStore(org.ff4j.property.store.InMemoryPropertyStore) Test(org.junit.Test)

Example 40 with InMemoryPropertyStore

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

the class InMemoryPropertiesStoreTest method testEmpty.

@Test
public void testEmpty() {
    // Given
    InMemoryPropertyStore ips = new InMemoryPropertyStore();
    Assert.assertTrue(ips.isEmpty());
}
Also used : InMemoryPropertyStore(org.ff4j.property.store.InMemoryPropertyStore) Test(org.junit.Test)

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