Search in sources :

Example 6 with AbstractKnowledgeTest

use of org.drools.cdi.kproject.AbstractKnowledgeTest in project drools by kiegroup.

the class KieSessionInjectionTest method beforeClass.

@BeforeClass
public static void beforeClass() {
    helper = new AbstractKnowledgeTest();
    try {
        helper.setUp();
    } catch (Exception e) {
        e.printStackTrace();
        fail(e.getMessage());
    }
    try {
        helper.createKieModule("jar1", true, "1.0");
        helper.createKieModule("jar1", true, "1.1");
    } catch (Exception e) {
        e.printStackTrace();
        fail("Unable to build dynamic KieModules:\n" + e.toString());
    }
    CDITestRunner.setUp();
    CDITestRunner.weld = CDITestRunner.createWeld(KieSessionInjectionTest.class.getName());
    CDITestRunner.container = CDITestRunner.weld.initialize();
}
Also used : AbstractKnowledgeTest(org.drools.cdi.kproject.AbstractKnowledgeTest) IOException(java.io.IOException) BeforeClass(org.junit.BeforeClass)

Example 7 with AbstractKnowledgeTest

use of org.drools.cdi.kproject.AbstractKnowledgeTest in project drools by kiegroup.

the class StatelessKieSessionInjectionTest method beforeClass.

@BeforeClass
public static void beforeClass() {
    helper = new AbstractKnowledgeTest();
    try {
        helper.setUp();
    } catch (Exception e) {
        e.printStackTrace();
        fail(e.getMessage());
    }
    try {
        helper.createKieModule("jar1", true, "1.0");
        helper.createKieModule("jar1", true, "1.1");
    } catch (Exception e) {
        fail("Unable to build dynamic KieModules:\n" + e.toString());
    }
    CDITestRunner.setUp();
    CDITestRunner.weld = CDITestRunner.createWeld(StatelessKieSessionInjectionTest.class.getName());
    CDITestRunner.container = CDITestRunner.weld.initialize();
}
Also used : AbstractKnowledgeTest(org.drools.cdi.kproject.AbstractKnowledgeTest) IOException(java.io.IOException) BeforeClass(org.junit.BeforeClass)

Aggregations

IOException (java.io.IOException)7 AbstractKnowledgeTest (org.drools.cdi.kproject.AbstractKnowledgeTest)7 BeforeClass (org.junit.BeforeClass)7