use of org.jbpm.runtime.manager.impl.deploy.testobject.EmbedingCustomObject in project jbpm by kiegroup.
the class ReflectionObjectModelResolverTest method testSimpleSingleObjectArgObjectModel.
@Test
public void testSimpleSingleObjectArgObjectModel() {
ObjectModel model = new ObjectModel("org.jbpm.runtime.manager.impl.deploy.testobject.EmbedingCustomObject", new Object[] { new ObjectModel("org.jbpm.runtime.manager.impl.deploy.testobject.SimpleCustomObject", new Object[] { "john" }), "testing object model" });
ObjectModelResolver resolver = new ReflectionObjectModelResolver();
Object result = resolver.getInstance(model, this.getClass().getClassLoader(), new HashMap<String, Object>());
assertNotNull(result);
assertTrue(result instanceof EmbedingCustomObject);
assertEquals("testing object model", ((EmbedingCustomObject) result).getDescription());
SimpleCustomObject customObject = ((EmbedingCustomObject) result).getCustomObject();
assertNotNull(customObject);
assertEquals("john", customObject.getName());
}
Aggregations