use of org.ff4j.property.store.InMemoryPropertyStore 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();
}
use of org.ff4j.property.store.InMemoryPropertyStore in project ff4j by ff4j.
the class PropertyStoreArchaiusPolledSourceTest method initArchauis.
@BeforeClass
public static void initArchauis() throws InterruptedException {
// Sample FF4J Store
PropertyStore ff4jStore = new InMemoryPropertyStore("ff4j-properties.xml");
// FF4Store as polling Source for Archiaus
PolledConfigurationSource ff4jSource = new FF4jPolledConfigurationSource(ff4jStore);
// Working Thread (polling from ff4j => Archaius)
AbstractPollingScheduler scheduler = new FixedDelayPollingScheduler(0, 1000, true);
// Define configuration with polling and source
configuration = new DynamicConfiguration(ff4jSource, scheduler);
}
use of org.ff4j.property.store.InMemoryPropertyStore in project ff4j by ff4j.
the class CommonsConfigWithPropertyStoreTest method initCommonsConfWithFF4j.
@Before
public void initCommonsConfWithFF4j() throws ConfigurationException {
// init configuration
ff4jConf = new FF4jConfiguration(new InMemoryPropertyStore("ff4j-properties.xml"));
// composite
config = new CompositeConfiguration();
config.setThrowExceptionOnMissing(true);
config.addConfiguration(ff4jConf);
}
use of org.ff4j.property.store.InMemoryPropertyStore in project ff4j by ff4j.
the class InMemoryPropertyStoreTest method testDonotImportInvalid.
@Test(expected = IllegalArgumentException.class)
public void testDonotImportInvalid() {
InMemoryPropertyStore f = new InMemoryPropertyStore();
f.importPropertiesFromXmlFile("invalid.xml");
}
use of org.ff4j.property.store.InMemoryPropertyStore in project ff4j by ff4j.
the class InMemoryPropertyStoreTest method testImportTwice.
@Test
public void testImportTwice() {
InMemoryPropertyStore f = new InMemoryPropertyStore();
f.importPropertiesFromXmlFile("test-ff4j-features.xml");
f.importPropertiesFromXmlFile("test-ff4j-features.xml");
}
Aggregations