use of org.ff4j.FF4j in project ff4j by ff4j.
the class AuthorizationManagementTest method initFF4j.
/**
* {@inheritDoc}
*/
@Override
public FF4j initFF4j() {
FF4j ff4j = new FF4j();
ff4j.setAuthorizationsManager(mockAuthManager);
return ff4j;
}
use of org.ff4j.FF4j in project ff4j by ff4j.
the class GenerationUtilTest method generationSource.
@Test
public void generationSource() throws IOException {
// Given
FF4j ff4j = new FF4j("ff4j.xml");
Assert.assertNotNull(ff4j.getFeatureStore());
Assert.assertNotNull(ff4j.getPropertiesStore());
// When
String data = GeneratorUtils.generateInterfaceConstantsSource(ff4j);
// Then
Assert.assertTrue(data.contains("FEATURE"));
Assert.assertTrue(data.contains("interface"));
Assert.assertNotNull(GeneratorUtils.exportInterfaceConstants(ff4j));
GeneratorUtils.generateInterfaceConstantFile(ff4j, new File("./target"));
}
use of org.ff4j.FF4j in project ff4j by ff4j.
the class FF4jInitializationTest method testInitConstructor3.
@Test
public void testInitConstructor3() {
FF4j f3 = new FF4j();
f3.setAuthorizationsManager(mock(AuthorizationsManager.class));
f3.autoCreate(true);
testingGeneratedFF4j(f3);
Assert.assertNotNull(f3.getAuthorizationsManager());
}
use of org.ff4j.FF4j in project ff4j by ff4j.
the class FF4jInitializationTest method testInitConstructor1.
@Test
public void testInitConstructor1() {
FF4j f1 = new FF4j();
f1.setAutocreate(true);
testingGeneratedFF4j(f1);
}
use of org.ff4j.FF4j in project ff4j by ff4j.
the class FF4jTest method testInitAuditProxy.
@Test
public void testInitAuditProxy() {
FF4j ff4j = new FF4j();
ff4j.setEnableAudit(true);
ff4j.getFeatureStore();
ff4j.setEnableAudit(false);
ff4j.getFeatureStore();
}
Aggregations