Search in sources :

Example 1 with InMemoryFeatureStore

use of org.ff4j.store.InMemoryFeatureStore in project ff4j by ff4j.

the class FeatureStoreResourceTestIT method testGet.

/**
 * TDD.
 */
@Test
public void testGet() {
    // Given
    Assert.assertTrue(ff4j.getFeatureStore() instanceof InMemoryFeatureStore);
    // When
    ClientResponse resHttp = resourceStore().get(ClientResponse.class);
    String resEntity = resHttp.getEntity(String.class);
    // Then, HTTPResponse
    Assert.assertEquals("Expected status is 200", Status.OK.getStatusCode(), resHttp.getStatus());
    Assert.assertNotNull(resEntity);
    // Then, Entity Object
    Assert.assertTrue(resEntity.contains(InMemoryFeatureStore.class.getCanonicalName()));
}
Also used : ClientResponse(com.sun.jersey.api.client.ClientResponse) InMemoryFeatureStore(org.ff4j.store.InMemoryFeatureStore) Test(org.junit.Test)

Example 2 with InMemoryFeatureStore

use of org.ff4j.store.InMemoryFeatureStore 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 3 with InMemoryFeatureStore

use of org.ff4j.store.InMemoryFeatureStore 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 4 with InMemoryFeatureStore

use of org.ff4j.store.InMemoryFeatureStore 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)

Example 5 with InMemoryFeatureStore

use of org.ff4j.store.InMemoryFeatureStore in project ff4j by ff4j.

the class AbstractStepDef method clearFeatureStore.

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

Aggregations

InMemoryFeatureStore (org.ff4j.store.InMemoryFeatureStore)31 Test (org.junit.Test)20 InMemoryPropertyStore (org.ff4j.property.store.InMemoryPropertyStore)12 FF4jCacheProxy (org.ff4j.cache.FF4jCacheProxy)6 Feature (org.ff4j.core.Feature)6 InMemoryCacheManager (org.ff4j.cache.InMemoryCacheManager)5 FF4j (org.ff4j.FF4j)4 FeatureStore (org.ff4j.core.FeatureStore)4 FF4JCacheManager (org.ff4j.cache.FF4JCacheManager)3 FlippingExecutionContext (org.ff4j.core.FlippingExecutionContext)3 Property (org.ff4j.property.Property)3 PropertyString (org.ff4j.property.PropertyString)3 AbstractFf4jTest (org.ff4j.test.AbstractFf4jTest)3 Before (org.junit.Before)3 HashSet (java.util.HashSet)2 Store2CachePollingScheduler (org.ff4j.cache.Store2CachePollingScheduler)2 FlippingStrategy (org.ff4j.core.FlippingStrategy)2 PropertyStore (org.ff4j.property.store.PropertyStore)2 ClientResponse (com.sun.jersey.api.client.ClientResponse)1 ArrayList (java.util.ArrayList)1