Search in sources :

Example 1 with EmbedingCustomObject

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());
}
Also used : EmbedingCustomObject(org.jbpm.runtime.manager.impl.deploy.testobject.EmbedingCustomObject) ObjectModel(org.kie.internal.runtime.conf.ObjectModel) NamedObjectModel(org.kie.internal.runtime.conf.NamedObjectModel) ObjectModelResolver(org.kie.internal.runtime.conf.ObjectModelResolver) ThirdLevelCustomObject(org.jbpm.runtime.manager.impl.deploy.testobject.ThirdLevelCustomObject) SimpleCustomObject(org.jbpm.runtime.manager.impl.deploy.testobject.SimpleCustomObject) EmbedingCustomObject(org.jbpm.runtime.manager.impl.deploy.testobject.EmbedingCustomObject) SimpleCustomObject(org.jbpm.runtime.manager.impl.deploy.testobject.SimpleCustomObject) Test(org.junit.Test)

Aggregations

EmbedingCustomObject (org.jbpm.runtime.manager.impl.deploy.testobject.EmbedingCustomObject)1 SimpleCustomObject (org.jbpm.runtime.manager.impl.deploy.testobject.SimpleCustomObject)1 ThirdLevelCustomObject (org.jbpm.runtime.manager.impl.deploy.testobject.ThirdLevelCustomObject)1 Test (org.junit.Test)1 NamedObjectModel (org.kie.internal.runtime.conf.NamedObjectModel)1 ObjectModel (org.kie.internal.runtime.conf.ObjectModel)1 ObjectModelResolver (org.kie.internal.runtime.conf.ObjectModelResolver)1