Search in sources :

Example 11 with ProjectConfig

use of com.optimizely.ab.config.ProjectConfig in project java-sdk by optimizely.

the class GsonConfigParserTest method parseProjectConfigV4.

@Test
public void parseProjectConfigV4() throws Exception {
    GsonConfigParser parser = new GsonConfigParser();
    ProjectConfig actual = parser.parseProjectConfig(validConfigJsonV4());
    ProjectConfig expected = validProjectConfigV4();
    verifyProjectConfig(actual, expected);
}
Also used : ProjectConfig(com.optimizely.ab.config.ProjectConfig) DatafileProjectConfigTestUtils.verifyProjectConfig(com.optimizely.ab.config.DatafileProjectConfigTestUtils.verifyProjectConfig) Test(org.junit.Test)

Example 12 with ProjectConfig

use of com.optimizely.ab.config.ProjectConfig in project java-sdk by optimizely.

the class GsonConfigParserTest method parseProjectConfigV3.

@Test
public void parseProjectConfigV3() throws Exception {
    GsonConfigParser parser = new GsonConfigParser();
    ProjectConfig actual = parser.parseProjectConfig(validConfigJsonV3());
    ProjectConfig expected = validProjectConfigV3();
    verifyProjectConfig(actual, expected);
}
Also used : ProjectConfig(com.optimizely.ab.config.ProjectConfig) DatafileProjectConfigTestUtils.verifyProjectConfig(com.optimizely.ab.config.DatafileProjectConfigTestUtils.verifyProjectConfig) Test(org.junit.Test)

Example 13 with ProjectConfig

use of com.optimizely.ab.config.ProjectConfig in project java-sdk by optimizely.

the class GsonConfigParserTest method parseNullFeatureEnabledProjectConfigV4.

@Test
public void parseNullFeatureEnabledProjectConfigV4() throws Exception {
    GsonConfigParser parser = new GsonConfigParser();
    ProjectConfig actual = parser.parseProjectConfig(nullFeatureEnabledConfigJsonV4());
    assertNotNull(actual);
    assertNotNull(actual.getExperiments());
    assertNotNull(actual.getFeatureFlags());
}
Also used : ProjectConfig(com.optimizely.ab.config.ProjectConfig) DatafileProjectConfigTestUtils.verifyProjectConfig(com.optimizely.ab.config.DatafileProjectConfigTestUtils.verifyProjectConfig) Test(org.junit.Test)

Example 14 with ProjectConfig

use of com.optimizely.ab.config.ProjectConfig in project java-sdk by optimizely.

the class JsonConfigParserTest method parseProjectConfigV2.

@Test
public void parseProjectConfigV2() throws Exception {
    JsonConfigParser parser = new JsonConfigParser();
    ProjectConfig actual = parser.parseProjectConfig(validConfigJsonV2());
    ProjectConfig expected = validProjectConfigV2();
    verifyProjectConfig(actual, expected);
}
Also used : ProjectConfig(com.optimizely.ab.config.ProjectConfig) DatafileProjectConfigTestUtils.verifyProjectConfig(com.optimizely.ab.config.DatafileProjectConfigTestUtils.verifyProjectConfig) Test(org.junit.Test)

Example 15 with ProjectConfig

use of com.optimizely.ab.config.ProjectConfig in project java-sdk by optimizely.

the class JsonConfigParserTest method parseProjectConfigV3.

@Test
public void parseProjectConfigV3() throws Exception {
    JsonConfigParser parser = new JsonConfigParser();
    ProjectConfig actual = parser.parseProjectConfig(validConfigJsonV3());
    ProjectConfig expected = validProjectConfigV3();
    verifyProjectConfig(actual, expected);
}
Also used : ProjectConfig(com.optimizely.ab.config.ProjectConfig) DatafileProjectConfigTestUtils.verifyProjectConfig(com.optimizely.ab.config.DatafileProjectConfigTestUtils.verifyProjectConfig) Test(org.junit.Test)

Aggregations

ProjectConfig (com.optimizely.ab.config.ProjectConfig)51 Test (org.junit.Test)45 DatafileProjectConfigTestUtils.verifyProjectConfig (com.optimizely.ab.config.DatafileProjectConfigTestUtils.verifyProjectConfig)28 Experiment (com.optimizely.ab.config.Experiment)19 FeatureFlag (com.optimizely.ab.config.FeatureFlag)14 FeatureVariable (com.optimizely.ab.config.FeatureVariable)12 LogEvent (com.optimizely.ab.event.LogEvent)10 Variation (com.optimizely.ab.config.Variation)9 Attribute (com.optimizely.ab.config.Attribute)7 EventBatch (com.optimizely.ab.event.internal.payload.EventBatch)7 ExhaustiveTest (com.optimizely.ab.categories.ExhaustiveTest)6 EventType (com.optimizely.ab.config.EventType)6 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)6 HashMap (java.util.HashMap)3 DecisionService (com.optimizely.ab.bucketing.DecisionService)2 Group (com.optimizely.ab.config.Group)2 LiveVariable (com.optimizely.ab.config.LiveVariable)2 Rollout (com.optimizely.ab.config.Rollout)2 Audience (com.optimizely.ab.config.audience.Audience)2 EventBuilder (com.optimizely.ab.event.internal.EventBuilder)2