use of org.kie.workbench.common.stunner.core.graph.Element in project kie-wb-common by kiegroup.
the class SessionPreviewCanvasHandlerProxyTest method checkRemoveChildDelegatesToWrapped.
@Test
public void checkRemoveChildDelegatesToWrapped() {
final Element parent = mock(Element.class);
final Element child = mock(Element.class);
proxy.removeChild(parent, child);
verify(wrapped).removeChild(eq(parent), eq(child));
}
use of org.kie.workbench.common.stunner.core.graph.Element in project kie-wb-common by kiegroup.
the class SessionPreviewCanvasHandlerProxyTest method updateElementPropertiesDelegatesToWrapped.
@Test
public void updateElementPropertiesDelegatesToWrapped() {
final Element candidate = mock(Element.class);
final MutationContext mutationContext = mock(MutationContext.class);
proxy.updateElementProperties(candidate, mutationContext);
verify(wrapped).updateElementProperties(eq(candidate), eq(mutationContext));
}
use of org.kie.workbench.common.stunner.core.graph.Element in project kie-wb-common by kiegroup.
the class SessionPreviewCanvasHandlerProxyTest method checkUpdateElementPositionDelegatesToWrapped.
@Test
public void checkUpdateElementPositionDelegatesToWrapped() {
final Element candidate = mock(Element.class);
final MutationContext mutationContext = mock(MutationContext.class);
proxy.updateElementPosition(candidate, mutationContext);
verify(wrapped).updateElementPosition(eq(candidate), eq(mutationContext));
}
use of org.kie.workbench.common.stunner.core.graph.Element in project kie-wb-common by kiegroup.
the class SessionPreviewCanvasHandlerProxyTest method checkNotifyCanvasElementRemovedDelegatesToWrapped.
@Test
public void checkNotifyCanvasElementRemovedDelegatesToWrapped() {
final Element candidate = mock(Element.class);
proxy.notifyCanvasElementRemoved(candidate);
verify(wrapped).notifyCanvasElementRemoved(eq(candidate));
}
use of org.kie.workbench.common.stunner.core.graph.Element in project kie-wb-common by kiegroup.
the class SessionPreviewCanvasHandlerProxyTest method checkRegisterDelegatesToWrapped.
@Test
@SuppressWarnings("unchecked")
public void checkRegisterDelegatesToWrapped() {
final Shape shape = mock(Shape.class);
final Element candidate = mock(Element.class);
final boolean fireEvents = true;
proxy.register(shape, candidate, fireEvents);
verify(wrapped).register(eq(shape), eq(candidate), eq(fireEvents));
final String shapeSetId = "ShapeSetId";
proxy.register(shapeSetId, candidate);
verify(wrapped).register(eq(shapeSetId), eq(candidate));
final ShapeFactory factory = mock(ShapeFactory.class);
proxy.register(factory, candidate, fireEvents);
verify(wrapped).register(eq(factory), eq(candidate), eq(fireEvents));
}
Aggregations