use of org.drools.workbench.models.guided.dtable.shared.model.MetadataCol52 in project drools-wb by kiegroup.
the class GuidedDecisionTablePresenterAttributesAndMetadataTest method updateMetadataColumn.
@Test
public void updateMetadataColumn() throws VetoException {
final MetadataCol52 column = new MetadataCol52();
column.setMetadata("metadata");
dtPresenter.appendColumn(column);
reset(modellerPresenter);
final MetadataCol52 update = new MetadataCol52();
column.setMetadata("update");
dtPresenter.updateColumn(column, update);
verify(synchronizer, times(1)).updateColumn(eq(column), eq(update));
verify(modellerPresenter, times(1)).updateLinks();
}
use of org.drools.workbench.models.guided.dtable.shared.model.MetadataCol52 in project drools-wb by kiegroup.
the class GuidedDecisionTablePresenterAttributesAndMetadataTest method deleteMetadataColumn.
@Test
public void deleteMetadataColumn() throws VetoException {
final MetadataCol52 column = new MetadataCol52();
column.setMetadata("metadata");
dtPresenter.appendColumn(column);
reset(modellerPresenter);
dtPresenter.deleteColumn(column);
verify(synchronizer, times(1)).deleteColumn(eq(column));
verify(modellerPresenter, times(1)).updateLinks();
}
use of org.drools.workbench.models.guided.dtable.shared.model.MetadataCol52 in project drools-wb by kiegroup.
the class CellContextMenuTest method testOnDecisionTableSelectedEventWithSelections.
@Test
public void testOnDecisionTableSelectedEventWithSelections() {
model.getMetadataCols().add(new MetadataCol52());
model.getData().add(new ArrayList<DTCellValue52>() {
{
add(new DTCellValue52(1));
add(new DTCellValue52("descr"));
add(new DTCellValue52("md"));
}
});
uiModel.selectCell(0, 2);
menu.onDecisionTableSelectedEvent(new DecisionTableSelectedEvent(dtPresenter));
verify(view, times(1)).enableCutMenuItem(eq(true));
verify(view, times(1)).enableCopyMenuItem(eq(true));
verify(view, times(1)).enablePasteMenuItem(eq(false));
verify(view, times(1)).enableDeleteCellMenuItem(eq(true));
}
use of org.drools.workbench.models.guided.dtable.shared.model.MetadataCol52 in project drools-wb by kiegroup.
the class CellContextMenuTest method testOnDecisionTableSelectionsChangedEventWithSelections.
@Test
public void testOnDecisionTableSelectionsChangedEventWithSelections() {
model.getMetadataCols().add(new MetadataCol52());
model.getData().add(new ArrayList<DTCellValue52>() {
{
add(new DTCellValue52(1));
add(new DTCellValue52("descr"));
add(new DTCellValue52("md"));
}
});
uiModel.selectCell(0, 2);
menu.onDecisionTableSelectionsChangedEvent(new DecisionTableSelectionsChangedEvent(dtPresenter));
verify(view, times(1)).enableCutMenuItem(eq(true));
verify(view, times(1)).enableCopyMenuItem(eq(true));
verify(view, times(1)).enablePasteMenuItem(eq(false));
verify(view, times(1)).enableDeleteCellMenuItem(eq(true));
}
use of org.drools.workbench.models.guided.dtable.shared.model.MetadataCol52 in project drools-wb by kiegroup.
the class CellContextMenuTest method testOnDecisionTableSelectedEventWithSelectionsWithClipboardPopulated.
@Test
public void testOnDecisionTableSelectedEventWithSelectionsWithClipboardPopulated() {
model.getMetadataCols().add(new MetadataCol52());
model.getData().add(new ArrayList<DTCellValue52>() {
{
add(new DTCellValue52(1));
add(new DTCellValue52("descr"));
add(new DTCellValue52("md"));
}
});
uiModel.selectCell(0, 2);
clipboard.setData(new HashSet<Clipboard.ClipboardData>() {
{
add(new DefaultClipboard.ClipboardDataImpl(0, 2, model.getData().get(0).get(2)));
}
});
menu.onDecisionTableSelectedEvent(new DecisionTableSelectedEvent(dtPresenter));
verify(view, times(1)).enableCutMenuItem(eq(true));
verify(view, times(1)).enableCopyMenuItem(eq(true));
verify(view, times(1)).enablePasteMenuItem(eq(true));
verify(view, times(1)).enableDeleteCellMenuItem(eq(true));
}
Aggregations