use of org.drools.workbench.screens.testscenario.client.ScenarioParentWidget in project drools-wb by kiegroup.
the class DeleteExecutionTraceButtonTest method testInit.
@Test
public void testInit() throws Exception {
final DeleteExecutionTraceButton testedButton = spy(new DeleteExecutionTraceButton());
final Scenario scenario = mock(Scenario.class);
final ExecutionTrace executionTrace = mock(ExecutionTrace.class);
final ScenarioParentWidget parentWidgetToRender = mock(ScenarioParentWidget.class);
doReturn(true).when(testedButton).deleteOperationConfirmed();
testedButton.init(scenario, executionTrace, parentWidgetToRender);
verify(testedButton).addClickHandler(clickCaptor.capture());
clickCaptor.getValue().onClick(null);
verify(scenario).removeExecutionTrace(executionTrace);
verify(parentWidgetToRender).renderEditor();
}
use of org.drools.workbench.screens.testscenario.client.ScenarioParentWidget in project drools-wb by kiegroup.
the class SettingsPageTest method testRefresh.
@Test
public void testRefresh() throws Exception {
final ScenarioParentWidget parentWidget = mock(ScenarioParentWidget.class);
final Path path = mock(Path.class);
final Scenario scenario = mock(Scenario.class);
settingsPage.refresh(parentWidget, path, scenario);
verify(settingsPageView).refresh(parentWidget, path, scenario);
}
Aggregations