Search in sources :

Example 1 with TestingSimpleDomainObject

use of org.kie.workbench.common.stunner.core.TestingSimpleDomainObject in project kie-wb-common by kiegroup.

the class GraphUtilsTest method setup.

@Before
@SuppressWarnings("unchecked")
public void setup() {
    graphTestHandler = new TestingGraphMockHandler();
    graphInstance = TestingGraphInstanceBuilder.newGraph4(graphTestHandler);
    domainObject = new TestingSimpleDomainObject(graphTestHandler);
    when(element.getContent()).thenReturn(content);
    when(content.getDefinition()).thenReturn(domainObject);
}
Also used : TestingGraphMockHandler(org.kie.workbench.common.stunner.core.TestingGraphMockHandler) TestingSimpleDomainObject(org.kie.workbench.common.stunner.core.TestingSimpleDomainObject) Before(org.junit.Before)

Example 2 with TestingSimpleDomainObject

use of org.kie.workbench.common.stunner.core.TestingSimpleDomainObject in project kie-wb-common by kiegroup.

the class DefinitionUtilsTest method setUp.

@Before
public void setUp() throws Exception {
    graphMockHandler = new TestingGraphMockHandler();
    domainObject = new TestingSimpleDomainObject(graphMockHandler);
    tested = new DefinitionUtils(graphMockHandler.getDefinitionManager(), new DefaultDefinitionsCacheRegistry(graphMockHandler.getFactoryManager(), graphMockHandler.getAdapterManager()));
}
Also used : TestingGraphMockHandler(org.kie.workbench.common.stunner.core.TestingGraphMockHandler) TestingSimpleDomainObject(org.kie.workbench.common.stunner.core.TestingSimpleDomainObject) DefaultDefinitionsCacheRegistry(org.kie.workbench.common.stunner.core.registry.impl.DefaultDefinitionsCacheRegistry) Before(org.junit.Before)

Example 3 with TestingSimpleDomainObject

use of org.kie.workbench.common.stunner.core.TestingSimpleDomainObject in project kie-wb-common by kiegroup.

the class UpdateDomainObjectPropertyValueCommandTest method setup.

@Before
@SuppressWarnings("unchecked")
public void setup() throws Exception {
    super.init();
    domainObject = new TestingSimpleDomainObject(testingGraphMockHandler);
    when(propertyAdapter.getValue(domainObject.getNameProperty())).thenReturn(PROPERTY_OLD_VALUE);
    this.command = new UpdateDomainObjectPropertyValueCommand(domainObject, TestingSimpleDomainObject.NAME, PROPERTY_VALUE);
}
Also used : TestingSimpleDomainObject(org.kie.workbench.common.stunner.core.TestingSimpleDomainObject) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)3 TestingSimpleDomainObject (org.kie.workbench.common.stunner.core.TestingSimpleDomainObject)3 TestingGraphMockHandler (org.kie.workbench.common.stunner.core.TestingGraphMockHandler)2 DefaultDefinitionsCacheRegistry (org.kie.workbench.common.stunner.core.registry.impl.DefaultDefinitionsCacheRegistry)1