Search in sources :

Example 1 with DeleteCellValueCommand

use of org.kie.workbench.common.dmn.client.commands.general.DeleteCellValueCommand in project kie-wb-common by kiegroup.

the class BaseDOMElementTest method checkFlushWithoutValue.

@Test
@SuppressWarnings("unchecked")
public void checkFlushWithoutValue() {
    domElement.flush("");
    verify(sessionCommandManager).execute(eq(canvasHandler), deleteCellValueCommandArgumentCaptor.capture());
    final DeleteCellValueCommand command = deleteCellValueCommandArgumentCaptor.getValue();
    command.getGraphCommand(canvasHandler).execute(graphCommandExecutionContext);
    verify(uiModelMapper).toDMNModel(eq(0), eq(1), valueSupplierArgumentCaptor.capture());
    final Supplier<Optional<GridCellValue<?>>> valueSupplier = valueSupplierArgumentCaptor.getValue();
    assertFalse(valueSupplier.get().isPresent());
}
Also used : Optional(java.util.Optional) DeleteCellValueCommand(org.kie.workbench.common.dmn.client.commands.general.DeleteCellValueCommand) Test(org.junit.Test)

Aggregations

Optional (java.util.Optional)1 Test (org.junit.Test)1 DeleteCellValueCommand (org.kie.workbench.common.dmn.client.commands.general.DeleteCellValueCommand)1