Search in sources :

Example 11 with InMemoryFeatureStore

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

the class InMemoryFeatureStoreTest method testUnitFeatureInitialization4.

@Test
public void testUnitFeatureInitialization4() {
    InMemoryFeatureStore f = new InMemoryFeatureStore();
    f.toJson();
    f.toString();
    f.getFileName();
}
Also used : InMemoryFeatureStore(org.ff4j.store.InMemoryFeatureStore) Test(org.junit.Test)

Example 12 with InMemoryFeatureStore

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

the class InMemoryFeatureStoreTest method initStore.

/**
 * {@inheritDoc}
 */
@Override
public FeatureStore initStore() {
    InMemoryFeatureStore imfs = new InMemoryFeatureStore();
    imfs.setLocation("ff4j.xml");
    return imfs;
}
Also used : InMemoryFeatureStore(org.ff4j.store.InMemoryFeatureStore)

Example 13 with InMemoryFeatureStore

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

the class AbstractEventRepositoryTest method setUp.

/**
 * {@inheritDoc}
 */
@Before
public void setUp() throws Exception {
    repo = initRepository();
    publisher = new EventPublisher(repo);
    features = new ArrayList<Feature>(new InMemoryFeatureStore("ff4j.xml").readAll().values());
}
Also used : EventPublisher(org.ff4j.audit.EventPublisher) InMemoryFeatureStore(org.ff4j.store.InMemoryFeatureStore) Feature(org.ff4j.core.Feature) Before(org.junit.Before)

Example 14 with InMemoryFeatureStore

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

the class AssertTest method initFF4J.

@Before
public void initFF4J() {
    if (assertFF4j == null) {
        ff4j = new FF4j();
        ff4j.setFeatureStore(new InMemoryFeatureStore("test-ff4j-features.xml"));
        ff4j.setPropertiesStore(new InMemoryPropertyStore("test-ff4j-features.xml"));
        ff4j.setAuthorizationsManager(new DefaultAuthorisationManager(Util.set("PERM1", "PERM2"), Util.set("PERM1", "PERM2", "PERM3")));
        assertFF4j = new AssertFf4j(ff4j);
    }
}
Also used : AssertFf4j(org.ff4j.test.AssertFf4j) InMemoryPropertyStore(org.ff4j.property.store.InMemoryPropertyStore) FF4j(org.ff4j.FF4j) InMemoryFeatureStore(org.ff4j.store.InMemoryFeatureStore) Before(org.junit.Before)

Example 15 with InMemoryFeatureStore

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

the class EventRepositoryTestSupport method setUp.

/**
 * {@inheritDoc}
 */
@Before
public void setUp() throws Exception {
    ff4j = new FF4j();
    ff4j.setFeatureStore(new InMemoryFeatureStore("test-ff4j-features.xml"));
    ff4j.setPropertiesStore(new InMemoryPropertyStore("test-ff4j-features.xml"));
    ff4j.setEventRepository(initRepository());
    repo = ff4j.getEventRepository();
}
Also used : InMemoryPropertyStore(org.ff4j.property.store.InMemoryPropertyStore) FF4j(org.ff4j.FF4j) InMemoryFeatureStore(org.ff4j.store.InMemoryFeatureStore) Before(org.junit.Before)

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