use of org.ff4j.FF4j in project ff4j by ff4j.
the class FF4jTest method testInitCache.
@Test
public void testInitCache() {
FF4j ff4j = new FF4j();
ff4j.cache(new InMemoryCacheManager());
}
use of org.ff4j.FF4j in project ff4j by ff4j.
the class FF4jTest method testgetProperty.
@Test
public void testgetProperty() {
FF4j ff4j = new FF4j();
ff4j.createProperty(new PropertyString("p1", "v1"));
Assert.assertNotNull(ff4j.getProperty("p1"));
Assert.assertNotNull(ff4j.getPropertyAsString("p1"));
Assert.assertEquals("v1", ff4j.getPropertyAsString("p1"));
}
use of org.ff4j.FF4j in project ff4j by ff4j.
the class FeatureStoreJCacheTest method setUp.
/**
* {@inheritDoc}
*/
@Before
public void setUp() throws Exception {
ff4j = new FF4j();
ff4j.setFeatureStore(initStore());
testedStore = ff4j.getFeatureStore();
assertFf4j = new AssertFf4j(ff4j);
}
use of org.ff4j.FF4j in project ff4j by ff4j.
the class FeatureStoreHttpSecured method testReadFeature.
@Test
public void testReadFeature() {
String targetRestApiURL = "http://localhost:8080/api/ff4j/";
String userName = "user";
String userPassword = "userPass";
// Init FF4j as HTTP CLIENT
FF4j ff4j = new FF4j();
ff4j.setFeatureStore(new FeatureStoreHttp(targetRestApiURL, userName, userPassword));
ff4j.setPropertiesStore(new PropertyStoreHttp(targetRestApiURL, userName, userPassword));
Feature f1 = ff4j.getFeatureStore().read("f1");
System.out.println(f1);
}
use of org.ff4j.FF4j in project ff4j by ff4j.
the class FeatureStoreHttpTest method initializingInMemory.
/**
* Start Server Grizzly before tests on remote FeatureStore.
*/
@BeforeClass
public static void initializingInMemory() throws Exception {
// Reinit FF4J
FeatureStoreHttpTestIT.ff4j = new FF4j(TEST_FEATURES_FILE);
jt = new FeatureStoreHttpTestIT();
jt.setUp();
}
Aggregations