Search in sources :

Example 1 with TestConfig

use of org.jaffa.rules.TestConfig in project jaffa-framework by jaffa-projects.

the class RuleInitializerFactoryTest method before.

/**
 * Setup common data.
 */
@Before
public void before() {
    VariationContext.setVariation("A");
    Realm realm = new Realm("realm");
    realm.setSource("Test");
    realm.regex(TestModel.class.getName());
    realm.register();
    ClassMetaData data = new ClassMetaData(TestModel.class);
    data.property("field1").initialize(FieldInitializerTest.FIELD1_INIT_VALUE);
    data.property("field2").initialize(FieldInitializerTest.FIELD2_INIT_VALUE.toString());
    data.setExecutionRealm(realm.getName());
    data.setVariation(VariationContext.getVariation());
    data.register();
    new TestConfig().initializeRule();
    target = new RuleInitializerFactory();
}
Also used : TestConfig(org.jaffa.rules.TestConfig) Realm(org.jaffa.rules.realm.Realm) TestModel(org.jaffa.rules.TestModel) ClassMetaData(org.jaffa.rules.meta.ClassMetaData) Before(org.junit.Before)

Aggregations

TestConfig (org.jaffa.rules.TestConfig)1 TestModel (org.jaffa.rules.TestModel)1 ClassMetaData (org.jaffa.rules.meta.ClassMetaData)1 Realm (org.jaffa.rules.realm.Realm)1 Before (org.junit.Before)1