Search in sources :

Example 11 with SimulationRunMetadata

use of org.drools.scenariosimulation.api.model.SimulationRunMetadata in project drools-wb by kiegroup.

the class CoverageReportPresenterTest method setSimulationRunMetadataNoRuleOrDecisionDMN.

@Test
public void setSimulationRunMetadataNoRuleOrDecisionDMN() {
    simulationRunMetadataLocal = new SimulationRunMetadata(0, executedLocal, outputCounterLocal, scenarioCounterLocal, auditLog);
    presenterSpy.setSimulationRunMetadata(simulationRunMetadataLocal, Type.DMN);
    verify(coverageReportViewMock, times(1)).setEmptyStatusText(eq(ScenarioSimulationEditorConstants.INSTANCE.noDecisionsAvailable()));
    verify(coverageReportViewMock, times(1)).hide();
    verify(presenterSpy, never()).populateSummary(anyInt(), anyInt(), anyDouble());
    verify(presenterSpy, never()).populateList(any());
    verify(presenterSpy, never()).populateScenarioList(any(), any());
    verify(coverageReportViewMock, never()).show();
}
Also used : SimulationRunMetadata(org.drools.scenariosimulation.api.model.SimulationRunMetadata) Test(org.junit.Test)

Example 12 with SimulationRunMetadata

use of org.drools.scenariosimulation.api.model.SimulationRunMetadata in project drools-wb by kiegroup.

the class CoverageReportPresenterTest method setSimulationRunMetadataNoRuleOrDecisionRULE.

@Test
public void setSimulationRunMetadataNoRuleOrDecisionRULE() {
    simulationRunMetadataLocal = new SimulationRunMetadata(0, executedLocal, outputCounterLocal, scenarioCounterLocal, auditLog);
    presenterSpy.setSimulationRunMetadata(simulationRunMetadataLocal, Type.RULE);
    verify(coverageReportViewMock, times(1)).setEmptyStatusText(eq(ScenarioSimulationEditorConstants.INSTANCE.noRulesAvailable()));
    verify(coverageReportViewMock, times(1)).hide();
    verify(presenterSpy, never()).populateSummary(anyInt(), anyInt(), anyDouble());
    verify(presenterSpy, never()).populateList(any());
    verify(presenterSpy, never()).populateScenarioList(any(), any());
    verify(coverageReportViewMock, never()).show();
}
Also used : SimulationRunMetadata(org.drools.scenariosimulation.api.model.SimulationRunMetadata) Test(org.junit.Test)

Aggregations

SimulationRunMetadata (org.drools.scenariosimulation.api.model.SimulationRunMetadata)12 HashMap (java.util.HashMap)6 Test (org.junit.Test)6 AuditLog (org.drools.scenariosimulation.api.model.AuditLog)5 ScenarioWithIndex (org.drools.scenariosimulation.api.model.ScenarioWithIndex)4 ArrayList (java.util.ArrayList)3 Map (java.util.Map)3 Scenario (org.drools.scenariosimulation.api.model.Scenario)3 List (java.util.List)2 Random (java.util.Random)2 CSVPrinter (org.apache.commons.csv.CSVPrinter)2 AuditLogLine (org.drools.scenariosimulation.api.model.AuditLogLine)2 ScenarioResultMetadata (org.drools.scenariosimulation.backend.runner.model.ScenarioResultMetadata)2 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1 BackgroundData (org.drools.scenariosimulation.api.model.BackgroundData)1 BackgroundDataWithIndex (org.drools.scenariosimulation.api.model.BackgroundDataWithIndex)1 ScenarioSimulationModel (org.drools.scenariosimulation.api.model.ScenarioSimulationModel)1 TestUtils.commonCheckAuditLogLine (org.drools.scenariosimulation.backend.TestUtils.commonCheckAuditLogLine)1 TestUtils.getRandomlyGeneratedDMNMessageList (org.drools.scenariosimulation.backend.TestUtils.getRandomlyGeneratedDMNMessageList)1 AbstractDMODataManagementStrategy (org.drools.workbench.screens.scenariosimulation.client.editor.strategies.AbstractDMODataManagementStrategy)1