Search in sources :

Example 1 with TestNavajoConfig

use of com.dexels.navajo.server.test.TestNavajoConfig in project navajo by Dexels.

the class StandardFunctionsTest method testEvaluateExpression.

@Test
public void testEvaluateExpression() {
    DispatcherFactory.createDispatcher(new TestDispatcher(new TestNavajoConfig()));
    FunctionInterface fi = fff.getInstance(cl, "EvaluateExpression");
    fi.reset();
    Navajo doc = createTestNavajo();
    Header h = NavajoFactory.getInstance().createHeader(doc, "aap", "noot", "mies", -1);
    doc.addHeader(h);
    fi.setInMessage(doc);
    fi.insertStringOperand("true");
    Object o = fi.evaluateWithTypeChecking();
    assertNotNull(o);
}
Also used : TestNavajoConfig(com.dexels.navajo.server.test.TestNavajoConfig) FunctionInterface(com.dexels.navajo.expression.api.FunctionInterface) Header(com.dexels.navajo.document.Header) TestDispatcher(com.dexels.navajo.server.test.TestDispatcher) Navajo(com.dexels.navajo.document.Navajo) Test(org.junit.Test)

Example 2 with TestNavajoConfig

use of com.dexels.navajo.server.test.TestNavajoConfig in project navajo by Dexels.

the class SharedFileStoreTest method setUp.

@Before
public void setUp() throws Exception {
    TribeManagerFactory.setInstance(new DefaultTribeManager());
    DispatcherFactory.createDispatcher(new TestDispatcher(new TestNavajoConfig()));
    DispatcherFactory.getInstance().setUseAuthorisation(false);
    si = new SharedFileStore(new File("sharedstore"), new TestNavajoConfig());
}
Also used : TestNavajoConfig(com.dexels.navajo.server.test.TestNavajoConfig) DefaultTribeManager(com.dexels.navajo.server.enterprise.tribe.DefaultTribeManager) TestDispatcher(com.dexels.navajo.server.test.TestDispatcher) File(java.io.File) Before(org.junit.Before)

Example 3 with TestNavajoConfig

use of com.dexels.navajo.server.test.TestNavajoConfig in project navajo by Dexels.

the class NavajoEventRegistryTest method setUp.

@Before
public void setUp() {
    DispatcherFactory.createDispatcher(new TestDispatcher(new TestNavajoConfig()));
    NavajoEventRegistry.clearInstance();
    message = null;
    instance1 = null;
    instance2 = null;
    instance3 = null;
    instance4 = null;
}
Also used : TestNavajoConfig(com.dexels.navajo.server.test.TestNavajoConfig) TestDispatcher(com.dexels.navajo.server.test.TestDispatcher) Before(org.junit.Before)

Example 4 with TestNavajoConfig

use of com.dexels.navajo.server.test.TestNavajoConfig in project navajo by Dexels.

the class StandardFunctionsTest method testEuro.

@Test
public void testEuro() {
    DispatcherFactory.createDispatcher(new TestDispatcher(new TestNavajoConfig()));
    FunctionInterface fi = fff.getInstance(cl, "Euro");
    fi.reset();
    Object o = fi.evaluateWithTypeChecking();
    assertNotNull(o);
}
Also used : TestNavajoConfig(com.dexels.navajo.server.test.TestNavajoConfig) FunctionInterface(com.dexels.navajo.expression.api.FunctionInterface) TestDispatcher(com.dexels.navajo.server.test.TestDispatcher) Test(org.junit.Test)

Example 5 with TestNavajoConfig

use of com.dexels.navajo.server.test.TestNavajoConfig in project navajo by Dexels.

the class SharedStoreInterfaceTest method setUp.

@Before
public void setUp() {
    DispatcherFactory.createDispatcher(new TestDispatcher(new TestNavajoConfig()));
    DispatcherFactory.getInstance().setUseAuthorisation(false);
    si = SharedStoreFactory.getInstance();
}
Also used : TestNavajoConfig(com.dexels.navajo.server.test.TestNavajoConfig) TestDispatcher(com.dexels.navajo.server.test.TestDispatcher) Before(org.junit.Before)

Aggregations

TestDispatcher (com.dexels.navajo.server.test.TestDispatcher)5 TestNavajoConfig (com.dexels.navajo.server.test.TestNavajoConfig)5 Before (org.junit.Before)3 FunctionInterface (com.dexels.navajo.expression.api.FunctionInterface)2 Test (org.junit.Test)2 Header (com.dexels.navajo.document.Header)1 Navajo (com.dexels.navajo.document.Navajo)1 DefaultTribeManager (com.dexels.navajo.server.enterprise.tribe.DefaultTribeManager)1 File (java.io.File)1