Search in sources :

Example 1 with InMemoryPropertyStore

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

the class InMemoryPropertyStoreTest method testGetters.

@Test
public void testGetters() {
    InMemoryPropertyStore ips = new InMemoryPropertyStore();
    ips.setLocation("test-ff4j-features.xml");
    ips.setFileName("invalid.xml");
    Assert.assertEquals("invalid.xml", ips.getFileName());
}
Also used : InMemoryPropertyStore(org.ff4j.property.store.InMemoryPropertyStore) Test(org.junit.Test)

Example 2 with InMemoryPropertyStore

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

the class InMemoryPropertyStoreTest 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 3 with InMemoryPropertyStore

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

the class InMemoryPropertyStoreTest 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 4 with InMemoryPropertyStore

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

the class InMemoryPropertyStoreTest method testEmpty2.

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

Example 5 with InMemoryPropertyStore

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

the class InMemoryPropertyStoreTest method testInitStores.

@Test
public void testInitStores() {
    new InMemoryPropertyStore(new HashMap<String, Property<?>>());
    InputStream in = getClass().getClassLoader().getResourceAsStream("test-ff4j-features.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)

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