use of org.gwtbootstrap3.client.ui.CheckBox in project drools-wb by kiegroup.
the class ColumnsPagePresenterTest method testHideMetadataClickHandlerWhenVetoExceptionIsNotRaised.
@Test
public void testHideMetadataClickHandlerWhenVetoExceptionIsNotRaised() throws Exception {
final MetadataCol52 clone = mock(MetadataCol52.class);
final CheckBox checkBox = mock(CheckBox.class);
final ClickEvent clickEvent = mock(ClickEvent.class);
final GuidedDecisionTableView.Presenter activeDecisionTable = mock(GuidedDecisionTableView.Presenter.class);
doReturn(Optional.of(activeDecisionTable)).when(modeller).getActiveDecisionTable();
doReturn(clone).when(metadataColumn).cloneColumn();
final ClickHandler clickHandler = presenter.hideMetadataClickHandler(modeller, checkBox, metadataColumn);
clickHandler.onClick(clickEvent);
verify(clone).setHideColumn(checkBox.getValue());
verify(activeDecisionTable).updateColumn(metadataColumn, clone);
}
Aggregations