Search in sources :

Example 1 with FF4JApiApplication

use of org.ff4j.web.api.FF4JApiApplication in project ff4j by ff4j.

the class FF4JApplicationTest method testApplicationInitialization.

@Test
public void testApplicationInitialization() {
    new FF4JApiApplication() {

        protected ApiConfig getApiConfig() {
            ApiConfig ac = new ApiConfig();
            ac.setAutorize(true);
            return ac;
        }
    };
    new FF4JApiApplication() {

        protected ApiConfig getApiConfig() {
            ApiConfig ac = new ApiConfig();
            ac.setAuthenticate(true);
            ac.setLog(true);
            return ac;
        }
    };
    Assert.assertNotNull(new FF4JApiApplication() {

        protected ApiConfig getApiConfig() {
            ApiConfig ac = new ApiConfig();
            ac.setAuthenticate(false);
            ac.setLog(false);
            return ac;
        }
    });
}
Also used : ApiConfig(org.ff4j.web.ApiConfig) FF4JApiApplication(org.ff4j.web.api.FF4JApiApplication) Test(org.junit.Test)

Aggregations

ApiConfig (org.ff4j.web.ApiConfig)1 FF4JApiApplication (org.ff4j.web.api.FF4JApiApplication)1 Test (org.junit.Test)1