use of org.kie.workbench.common.dmn.client.commands.factory.graph.DMNDeleteElementsGraphCommand in project kie-wb-common by kiegroup.
the class DMNDeleteElementsCommandTest method testNewGraphCommand.
@Test
public void testNewGraphCommand() {
final DMNGraphsProvider selectedDiagramProvider = mock(DMNGraphsProvider.class);
final ArrayList<Element> elements = new ArrayList<>();
final Element element = mock(Element.class);
when(element.getUUID()).thenReturn("uuid");
elements.add(element);
final DMNDeleteElementsCommand cmd = new DMNDeleteElementsCommand(elements, selectedDiagramProvider);
final Command<GraphCommandExecutionContext, RuleViolation> actual = cmd.newGraphCommand(null);
assertTrue(actual instanceof DMNDeleteElementsGraphCommand);
assertEquals(cmd.getGraphsProvider(), ((DMNDeleteElementsGraphCommand) actual).getGraphsProvider());
}
Aggregations