Search in sources :

Example 6 with EnableTestToolsEvent

use of org.drools.workbench.screens.scenariosimulation.client.events.EnableTestToolsEvent in project drools-wb by kiegroup.

the class ScenarioSimulationGridHeaderUtilitiesTest method testEnableTestToolsEventInstanceNotAssigned.

@Test
public void testEnableTestToolsEventInstanceNotAssigned() {
    when(scenarioGridColumnOne.isInstanceAssigned()).thenReturn(false);
    final EnableTestToolsEvent event = ScenarioSimulationGridHeaderUtilities.getEnableTestToolsEvent(scenarioGridMock, scenarioGridColumnOne, clickedScenarioHeaderMetadataMock, UI_COLUMN_INDEX, COLUMN_GROUP);
    assertThat(event.getFilterTerm()).isEqualTo(COLUMN_ONE_TITLE + ";" + COLUMN_TWO_TITLE + ";" + MULTIPART_VALUE);
    assertThat(event.isNotEqualsSearch()).isTrue();
}
Also used : EnableTestToolsEvent(org.drools.workbench.screens.scenariosimulation.client.events.EnableTestToolsEvent) AbstractScenarioSimulationTest(org.drools.workbench.screens.scenariosimulation.client.AbstractScenarioSimulationTest) Test(org.junit.Test)

Example 7 with EnableTestToolsEvent

use of org.drools.workbench.screens.scenariosimulation.client.events.EnableTestToolsEvent in project drools-wb by kiegroup.

the class ScenarioSimulationEventHandlerTest method onEnableTestToolsEvent.

@Test
public void onEnableTestToolsEvent() {
    EnableTestToolsEvent event = new EnableTestToolsEvent();
    scenarioSimulationEventHandler.onEvent(event);
    verify(scenarioSimulationEventHandler).commonExecution(isA(EnableTestToolsCommand.class), eq(false));
}
Also used : EnableTestToolsEvent(org.drools.workbench.screens.scenariosimulation.client.events.EnableTestToolsEvent) EnableTestToolsCommand(org.drools.workbench.screens.scenariosimulation.client.commands.actualcommands.EnableTestToolsCommand) Test(org.junit.Test) AbstractScenarioSimulationTest(org.drools.workbench.screens.scenariosimulation.client.AbstractScenarioSimulationTest)

Aggregations

EnableTestToolsEvent (org.drools.workbench.screens.scenariosimulation.client.events.EnableTestToolsEvent)7 AbstractScenarioSimulationTest (org.drools.workbench.screens.scenariosimulation.client.AbstractScenarioSimulationTest)4 Test (org.junit.Test)4 ReloadTestToolsEvent (org.drools.workbench.screens.scenariosimulation.client.events.ReloadTestToolsEvent)2 ScenarioHeaderMetaData (org.drools.workbench.screens.scenariosimulation.client.metadata.ScenarioHeaderMetaData)2 AbstractScesimData (org.drools.scenariosimulation.api.model.AbstractScesimData)1 ExpressionIdentifier (org.drools.scenariosimulation.api.model.ExpressionIdentifier)1 FactMapping (org.drools.scenariosimulation.api.model.FactMapping)1 FactMappingType (org.drools.scenariosimulation.api.model.FactMappingType)1 HEADER_ROWS_HEIGHT (org.drools.workbench.screens.scenariosimulation.client.TestProperties.HEADER_ROWS_HEIGHT)1 TEST (org.drools.workbench.screens.scenariosimulation.client.TestProperties.TEST)1 EnableTestToolsCommand (org.drools.workbench.screens.scenariosimulation.client.commands.actualcommands.EnableTestToolsCommand)1 ScenarioSimulationBuilders (org.drools.workbench.screens.scenariosimulation.client.utils.ScenarioSimulationBuilders)1 ScenarioSimulationGridHeaderUtilities.getEnableTestToolsEvent (org.drools.workbench.screens.scenariosimulation.client.utils.ScenarioSimulationGridHeaderUtilities.getEnableTestToolsEvent)1 Before (org.junit.Before)1 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)1