Search in sources :

Example 31 with InMemoryFeatureStore

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

the class FeatureStoreResource2TestIT method testGet.

/**
 * TDD.
 */
@Test
public void testGet() {
    // Given
    Assert.assertTrue(ff4j.getFeatureStore() instanceof InMemoryFeatureStore);
    // When
    WebTarget wResFeatures = resourceStore();
    Response httpResponse = wResFeatures.request().get();
    String resEntity = httpResponse.readEntity(String.class);
    // Then, HTTPResponse
    Assert.assertEquals("Expected status is 200", Status.OK.getStatusCode(), httpResponse.getStatus());
    Assert.assertNotNull(resEntity);
    // Then, Entity Object
    Assert.assertTrue(resEntity.contains(InMemoryFeatureStore.class.getCanonicalName()));
}
Also used : Response(javax.ws.rs.core.Response) InMemoryFeatureStore(org.ff4j.store.InMemoryFeatureStore) WebTarget(javax.ws.rs.client.WebTarget) Test(org.junit.Test)

Example 32 with InMemoryFeatureStore

use of org.ff4j.store.InMemoryFeatureStore in project ff4j-spring-boot-starter-parent 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 33 with InMemoryFeatureStore

use of org.ff4j.store.InMemoryFeatureStore in project ff4j-spring-boot-starter-parent 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 34 with InMemoryFeatureStore

use of org.ff4j.store.InMemoryFeatureStore in project ff4j-spring-boot-starter-parent 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)

Example 35 with InMemoryFeatureStore

use of org.ff4j.store.InMemoryFeatureStore in project ff4j-spring-boot-starter-parent 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

InMemoryFeatureStore (org.ff4j.store.InMemoryFeatureStore)35 Test (org.junit.Test)20 InMemoryPropertyStore (org.ff4j.property.store.InMemoryPropertyStore)16 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