use of org.kie.internal.runtime.conf.ObjectModelResolver in project jbpm by kiegroup.
the class ReflectionObjectModelResolverTest method testSimpleContextValueObjectModel.
@Test
public void testSimpleContextValueObjectModel() {
ObjectModel model = new ObjectModel("org.jbpm.runtime.manager.impl.deploy.testobject.SimpleCustomObject", new Object[] { "context" });
ObjectModelResolver resolver = new ReflectionObjectModelResolver();
Map<String, Object> contextParam = new HashMap<String, Object>();
contextParam.put("context", "value from the context");
Object result = resolver.getInstance(model, this.getClass().getClassLoader(), contextParam);
assertNotNull(result);
assertTrue(result instanceof SimpleCustomObject);
assertEquals("value from the context", ((SimpleCustomObject) result).getName());
}
Aggregations