Search in sources :

Example 1 with AbstractKnowledgeTest

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

the class KieBaseInjectionTest 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(KieBaseInjectionTest.class.getName());
    CDITestRunner.container = CDITestRunner.weld.initialize();
}
Also used : AbstractKnowledgeTest(org.drools.cdi.kproject.AbstractKnowledgeTest) IOException(java.io.IOException) BeforeClass(org.junit.BeforeClass)

Example 2 with AbstractKnowledgeTest

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

the class KieContainerInjectionTest 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");
        helper.createKieModule("jar2", true, "2.0");
    } catch (Exception e) {
        e.printStackTrace();
        fail("Unable to build dynamic KieModules:\n" + e.toString());
    }
    CDITestRunner.setUp(helper.getFileManager().newFile("jar2-2.0.jar"));
    CDITestRunner.weld = CDITestRunner.createWeld(KieContainerInjectionTest.class.getName());
    CDITestRunner.container = CDITestRunner.weld.initialize();
}
Also used : AbstractKnowledgeTest(org.drools.cdi.kproject.AbstractKnowledgeTest) IOException(java.io.IOException) BeforeClass(org.junit.BeforeClass)

Example 3 with AbstractKnowledgeTest

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

the class KieSessionDefaultInjectionTest 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("jar2", true, "2.0");
    } catch (Exception e) {
        e.printStackTrace();
        fail("Unable to build dynamic KieModules:\n" + e.toString());
    }
    CDITestRunner.setUp(helper.getFileManager().newFile("jar2-2.0.jar"));
    CDITestRunner.weld = CDITestRunner.createWeld(KieSessionDefaultInjectionTest.class.getName());
    CDITestRunner.container = CDITestRunner.weld.initialize();
}
Also used : AbstractKnowledgeTest(org.drools.cdi.kproject.AbstractKnowledgeTest) IOException(java.io.IOException) BeforeClass(org.junit.BeforeClass)

Example 4 with AbstractKnowledgeTest

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

the class KieBaseDefaultInjectionTest 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("jar2", true, "2.0");
    } catch (Exception e) {
        e.printStackTrace();
        fail("Unable to build dynamic KieModules:\n" + e.toString());
    }
    CDITestRunner.setUp(helper.getFileManager().newFile("jar2-2.0.jar"));
    CDITestRunner.weld = CDITestRunner.createWeld(KieBaseDefaultInjectionTest.class.getName());
    CDITestRunner.container = CDITestRunner.weld.initialize();
}
Also used : AbstractKnowledgeTest(org.drools.cdi.kproject.AbstractKnowledgeTest) IOException(java.io.IOException) BeforeClass(org.junit.BeforeClass)

Example 5 with AbstractKnowledgeTest

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

the class StatelessKieSessionDefaultInjectionTest 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("jar2", true, "2.0");
    } catch (Exception e) {
        e.printStackTrace();
        fail("Unable to build dynamic KieModules:\n" + e.toString());
    }
    CDITestRunner.setUp(helper.getFileManager().newFile("jar2-2.0.jar"));
    CDITestRunner.weld = CDITestRunner.createWeld(StatelessKieSessionDefaultInjectionTest.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