@Test public void testUnitFeatureInitialization2() { LinkedHashMap<String, Feature> map1 = new LinkedHashMap<String, Feature>(); map1.put("new", new Feature("new", true, "description")); map1.put("old", new Feature("old", true, "description")); InMemoryFeatureStore imfs = new InMemoryFeatureStore(map1); Assert.assertEquals(2, imfs.readAll().size()); Assert.assertNotNull(imfs.read("old")); }
@Test public void testUnitFeatureInitialization() { InMemoryFeatureStore imfs = new InMemoryFeatureStore(); imfs.create(new Feature("default", true, "grp1", "desc", null, new PonderationStrategy())); Assert.assertEquals(1, imfs.readAll().size()); }
/** {@inheritDoc} */ @Override public FeatureStore initStore() { InMemoryFeatureStore imfs = new InMemoryFeatureStore(); imfs.setLocation("ff4j.xml"); return imfs; }