use of org.whole.lang.bindings.IBindingManager in project whole by wholeplatform.
the class WorkflowsInterpreterVisitorTest method testInvokeQuery.
@Test
public void testInvokeQuery() {
IEntity invokeQueryTest = WorkflowsTestTemplateManager.instance().create("invokeQueryTest");
IBindingManager args = BindingManagerFactory.instance.createArguments();
args.wEnterScope();
InterpreterOperation.interpret(invokeQueryTest, args);
args.wExitScope();
Assert.assertFalse(args.wIsSet("queryName"));
Assert.assertFalse(args.wIsSet("methodName"));
Assert.assertFalse(args.wIsSet("self"));
Assert.assertFalse(args.wIsSet("methodCall"));
}
use of org.whole.lang.bindings.IBindingManager in project whole by wholeplatform.
the class WorkflowsInterpreterVisitorTest method testLoadJavaModel.
@Test
public void testLoadJavaModel() {
IEntity loadJavaModelTest = WorkflowsTestTemplateManager.instance().create("loadJavaModelTest");
IBindingManager args = BindingManagerFactory.instance.createArguments();
InterpreterOperation.interpret(loadJavaModelTest, args);
Assert.assertTrue(Matcher.match(args.wGet("model"), new JavaClassTemplateFactory(SampleModel.class).create()));
}
use of org.whole.lang.bindings.IBindingManager in project whole by wholeplatform.
the class WorkflowsInterpreterVisitorTest method testLoadModel.
@Test
public void testLoadModel() {
IEntity loadModelTest = WorkflowsTestTemplateManager.instance().create("loadModelTest");
IBindingManager args = BindingManagerFactory.instance.createArguments();
InterpreterOperation.interpret(loadModelTest, args);
Assert.assertFalse(args.wIsSet("varName"));
Assert.assertTrue(Matcher.match(args.wGet("model"), new SampleModel().create()));
}
use of org.whole.lang.bindings.IBindingManager in project whole by wholeplatform.
the class WorkflowsInterpreterVisitorTest method testInvokeJavaInstanceMethod.
@Test
public void testInvokeJavaInstanceMethod() {
IEntity invokeJavaInstanceMethodTest = WorkflowsTestTemplateManager.instance().create("invokeJavaInstanceMethodTest");
IBindingManager args = BindingManagerFactory.instance.createArguments();
InterpreterOperation.interpret(invokeJavaInstanceMethodTest, args);
Assert.assertTrue(args.wIsSet("value"));
Assert.assertFalse(args.wBooleanValue("value"));
}
use of org.whole.lang.bindings.IBindingManager in project whole by wholeplatform.
the class WorkflowsInterpreterVisitorTest method testLoadAndSaveModelToString.
@Test
public void testLoadAndSaveModelToString() {
IEntity loadAndSaveModelToStringTest = WorkflowsTestTemplateManager.instance().create("loadAndSaveModelToStringTest");
IBindingManager args = BindingManagerFactory.instance.createArguments();
String ls = System.getProperty("line.separator");
String sourceString = "Hello, world!" + ls + "This is a three" + ls + "lines text message";
args.wDefValue("sourceString", sourceString);
InterpreterOperation.interpret(loadAndSaveModelToStringTest, args);
Assert.assertTrue(args.wIsSet("targetString"));
Assert.assertEquals(args.wStringValue("sourceString"), args.wStringValue("targetString"));
}
Aggregations