Search in sources :

Example 1 with ScenarioParentWidget

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();
}
Also used : ScenarioParentWidget(org.drools.workbench.screens.testscenario.client.ScenarioParentWidget) ExecutionTrace(org.drools.workbench.models.testscenarios.shared.ExecutionTrace) Scenario(org.drools.workbench.models.testscenarios.shared.Scenario) Test(org.junit.Test)

Example 2 with ScenarioParentWidget

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);
}
Also used : Path(org.uberfire.backend.vfs.Path) ScenarioParentWidget(org.drools.workbench.screens.testscenario.client.ScenarioParentWidget) Scenario(org.drools.workbench.models.testscenarios.shared.Scenario) Test(org.junit.Test)

Aggregations

Scenario (org.drools.workbench.models.testscenarios.shared.Scenario)2 ScenarioParentWidget (org.drools.workbench.screens.testscenario.client.ScenarioParentWidget)2 Test (org.junit.Test)2 ExecutionTrace (org.drools.workbench.models.testscenarios.shared.ExecutionTrace)1 Path (org.uberfire.backend.vfs.Path)1