Search in sources :

Example 1 with Background

use of org.drools.scenariosimulation.api.model.Background in project drools by kiegroup.

the class RuleScenarioRunnerHelperTest method setup.

@Before
public void setup() {
    when(kieContainerMock.getClassLoader()).thenReturn(classLoader);
    simulation = new Simulation();
    background = new Background();
    settings = new Settings();
    settings.setType(ScenarioSimulationModel.Type.RULE);
    personFactIdentifier = FactIdentifier.create("Fact 1", Person.class.getCanonicalName());
    firstNameGivenExpressionIdentifier = ExpressionIdentifier.create("First Name Given", FactMappingType.GIVEN);
    firstNameGivenFactMapping = simulation.getScesimModelDescriptor().addFactMapping(personFactIdentifier, firstNameGivenExpressionIdentifier);
    firstNameGivenFactMapping.addExpressionElement("Fact 1", String.class.getCanonicalName());
    firstNameGivenFactMapping.addExpressionElement("firstName", String.class.getCanonicalName());
    disputeFactIdentifier = FactIdentifier.create("Fact 2", Dispute.class.getCanonicalName());
    amountGivenExpressionIdentifier = ExpressionIdentifier.create("Amount Given", FactMappingType.GIVEN);
    amountNameGivenFactMapping = simulation.getScesimModelDescriptor().addFactMapping(disputeFactIdentifier, amountGivenExpressionIdentifier);
    amountNameGivenFactMapping.addExpressionElement("Fact 2", Double.class.getCanonicalName());
    amountNameGivenFactMapping.addExpressionElement("amount", Double.class.getCanonicalName());
    firstNameExpectedExpressionIdentifier = ExpressionIdentifier.create("First Name Expected", FactMappingType.EXPECT);
    firstNameExpectedFactMapping = simulation.getScesimModelDescriptor().addFactMapping(personFactIdentifier, firstNameExpectedExpressionIdentifier);
    firstNameExpectedFactMapping.addExpressionElement("Fact 1", String.class.getCanonicalName());
    firstNameExpectedFactMapping.addExpressionElement("firstName", String.class.getCanonicalName());
    amountExpectedExpressionIdentifier = ExpressionIdentifier.create("Amount Expected", FactMappingType.EXPECT);
    amountNameExpectedFactMapping = simulation.getScesimModelDescriptor().addFactMapping(disputeFactIdentifier, amountExpectedExpressionIdentifier);
    amountNameExpectedFactMapping.addExpressionElement("Fact 2", Double.class.getCanonicalName());
    amountNameExpectedFactMapping.addExpressionElement("amount", Double.class.getCanonicalName());
    expressionGivenExpressionIdentifier = ExpressionIdentifier.create("directMapping", FactMappingType.GIVEN);
    disputeExpressionGivenFactMapping = simulation.getScesimModelDescriptor().addFactMapping(disputeFactIdentifier, expressionGivenExpressionIdentifier);
    disputeExpressionGivenFactMapping.setFactMappingValueType(FactMappingValueType.EXPRESSION);
    disputeExpressionGivenFactMapping.addExpressionElement("Dispute", Dispute.class.getCanonicalName());
    scenario1 = simulation.addData();
    scenario1.setDescription(TEST_DESCRIPTION);
    scenario1.addMappingValue(personFactIdentifier, firstNameGivenExpressionIdentifier, NAME);
    scenario1.addMappingValue(personFactIdentifier, firstNameExpectedExpressionIdentifier, NAME);
    scenario2 = simulation.addData();
    scenario2.setDescription(TEST_DESCRIPTION);
    scenario2.addMappingValue(personFactIdentifier, firstNameGivenExpressionIdentifier, NAME);
    scenario2.addMappingValue(personFactIdentifier, firstNameExpectedExpressionIdentifier, NAME);
    scenario2.addMappingValue(disputeFactIdentifier, amountGivenExpressionIdentifier, AMOUNT);
    amountNameExpectedFactMappingValue = scenario2.addMappingValue(disputeFactIdentifier, amountExpectedExpressionIdentifier, AMOUNT);
    backgroundFirstNameGivenFactMapping = background.getScesimModelDescriptor().addFactMapping(personFactIdentifier, firstNameGivenExpressionIdentifier);
    backgroundFirstNameGivenFactMapping.addExpressionElement("Person", String.class.getCanonicalName());
    backgroundFirstNameGivenFactMapping.addExpressionElement("firstName", String.class.getCanonicalName());
    backgroundAmountNameGivenFactMapping = background.getScesimModelDescriptor().addFactMapping(disputeFactIdentifier, amountGivenExpressionIdentifier);
    backgroundAmountNameGivenFactMapping.addExpressionElement("Dispute", Double.class.getCanonicalName());
    backgroundAmountNameGivenFactMapping.addExpressionElement("amount", Double.class.getCanonicalName());
    backgroundData1 = background.addData();
    backgroundData1.addMappingValue(personFactIdentifier, firstNameGivenExpressionIdentifier, NAME);
    backgroundData1.addMappingValue(disputeFactIdentifier, amountGivenExpressionIdentifier, AMOUNT);
    backgroundData2 = background.addData();
    backgroundData2.addMappingValue(personFactIdentifier, firstNameGivenExpressionIdentifier, NAME);
}
Also used : Simulation(org.drools.scenariosimulation.api.model.Simulation) Background(org.drools.scenariosimulation.api.model.Background) Dispute(org.drools.scenariosimulation.backend.model.Dispute) Settings(org.drools.scenariosimulation.api.model.Settings) Before(org.junit.Before)

Example 2 with Background

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

the class ScenarioSimulationBuilderTest method createBackground.

@Test
public void createBackground() throws Exception {
    Background backgroundRetrieved = scenarioSimulationBuilder.createBackground(contextMock, ScenarioSimulationModel.Type.RULE, VALUE);
    assertNotNull(backgroundRetrieved);
    assertEquals(ruleBackgroundMock, backgroundRetrieved);
    backgroundRetrieved = scenarioSimulationBuilder.createBackground(contextMock, ScenarioSimulationModel.Type.DMN, VALUE);
    assertNotNull(backgroundRetrieved);
    assertEquals(dmnBackgroundMock, backgroundRetrieved);
}
Also used : Background(org.drools.scenariosimulation.api.model.Background) Test(org.junit.Test)

Example 3 with Background

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

the class DMNSimulationSettingsCreationStrategyTest method createBackground.

@Test
public void createBackground() throws Exception {
    FactModelTuple factModelTuple = getFactModelTuple();
    final Path pathMock = mock(Path.class);
    final String dmnFilePath = "test";
    final Background retrieved = dmnSimulationCreationStrategy.createBackground(pathMock, dmnFilePath);
    assertNotNull(retrieved);
    verify(dmnTypeServiceMock, never()).initializeNameAndNamespace(any(Settings.class), eq(pathMock), eq(dmnFilePath));
    assertFalse(retrieved.getScesimModelDescriptor().getUnmodifiableFactMappings().stream().anyMatch(elem -> OTHER.equals(elem.getExpressionIdentifier().getType())));
    assertTrue(retrieved.getScesimModelDescriptor().getUnmodifiableFactMappings().stream().allMatch(elem -> GIVEN.equals(elem.getExpressionIdentifier().getType())));
}
Also used : Path(org.uberfire.backend.vfs.Path) Arrays(java.util.Arrays) ScenarioSimulationModel(org.drools.scenariosimulation.api.model.ScenarioSimulationModel) FactModelTree(org.drools.workbench.screens.scenariosimulation.model.typedescriptor.FactModelTree) GIVEN(org.drools.scenariosimulation.api.model.FactMappingType.GIVEN) VALUE(org.drools.scenariosimulation.api.utils.ConstantsHolder.VALUE) DMNTypeService(org.drools.workbench.screens.scenariosimulation.service.DMNTypeService) Matchers.eq(org.mockito.Matchers.eq) Map(java.util.Map) ScesimModelDescriptor(org.drools.scenariosimulation.api.model.ScesimModelDescriptor) Mockito.doReturn(org.mockito.Mockito.doReturn) AbstractDMNTest(org.drools.workbench.screens.scenariosimulation.backend.server.AbstractDMNTest) Settings(org.drools.scenariosimulation.api.model.Settings) Matchers.any(org.mockito.Matchers.any) List(java.util.List) FactMapping(org.drools.scenariosimulation.api.model.FactMapping) Assert.assertFalse(org.junit.Assert.assertFalse) Simulation(org.drools.scenariosimulation.api.model.Simulation) InputDataNode(org.kie.dmn.api.core.ast.InputDataNode) EXPECT(org.drools.scenariosimulation.api.model.FactMappingType.EXPECT) SortedMap(java.util.SortedMap) Mockito.mock(org.mockito.Mockito.mock) DMNType(org.kie.dmn.api.core.DMNType) Mock(org.mockito.Mock) FactModelTuple(org.drools.workbench.screens.scenariosimulation.model.typedescriptor.FactModelTuple) RunWith(org.junit.runner.RunWith) FactIdentifier(org.drools.scenariosimulation.api.model.FactIdentifier) HashMap(java.util.HashMap) Mockito.spy(org.mockito.Mockito.spy) Matchers.anyString(org.mockito.Matchers.anyString) ArrayList(java.util.ArrayList) ExpressionIdentifier(org.drools.scenariosimulation.api.model.ExpressionIdentifier) DecisionNode(org.kie.dmn.api.core.ast.DecisionNode) Assertions.assertThatThrownBy(org.assertj.core.api.Assertions.assertThatThrownBy) DECISION(org.drools.workbench.screens.scenariosimulation.model.typedescriptor.FactModelTree.Type.DECISION) Path(org.uberfire.backend.vfs.Path) ScenarioWithIndex(org.drools.scenariosimulation.api.model.ScenarioWithIndex) Before(org.junit.Before) OTHER(org.drools.scenariosimulation.api.model.FactMappingType.OTHER) Assert.assertNotNull(org.junit.Assert.assertNotNull) Background(org.drools.scenariosimulation.api.model.Background) Assert.assertTrue(org.junit.Assert.assertTrue) IOException(java.io.IOException) Test(org.junit.Test) Mockito.times(org.mockito.Mockito.times) Mockito.when(org.mockito.Mockito.when) Mockito.verify(org.mockito.Mockito.verify) Mockito.never(org.mockito.Mockito.never) MockitoJUnitRunner(org.mockito.runners.MockitoJUnitRunner) TreeMap(java.util.TreeMap) Collections(java.util.Collections) Assert.assertEquals(org.junit.Assert.assertEquals) Background(org.drools.scenariosimulation.api.model.Background) FactModelTuple(org.drools.workbench.screens.scenariosimulation.model.typedescriptor.FactModelTuple) Matchers.anyString(org.mockito.Matchers.anyString) Settings(org.drools.scenariosimulation.api.model.Settings) AbstractDMNTest(org.drools.workbench.screens.scenariosimulation.backend.server.AbstractDMNTest) Test(org.junit.Test)

Example 4 with Background

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

the class RULESimulationSettingsCreationStrategyTest method createBackground.

@Test
public void createBackground() throws Exception {
    final Background retrieved = ruleSimulationSettingsCreationStrategy.createBackground(pathMock, value);
    assertNotNull(retrieved);
    assertFalse(retrieved.getScesimModelDescriptor().getUnmodifiableFactMappings().stream().anyMatch(elem -> OTHER.equals(elem.getExpressionIdentifier().getType())));
    assertTrue(retrieved.getScesimModelDescriptor().getUnmodifiableFactMappings().stream().allMatch(elem -> GIVEN.equals(elem.getExpressionIdentifier().getType())));
}
Also used : OTHER(org.drools.scenariosimulation.api.model.FactMappingType.OTHER) Mock(org.mockito.Mock) Assert.assertFalse(org.junit.Assert.assertFalse) Assert.assertNotNull(org.junit.Assert.assertNotNull) Settings(org.drools.scenariosimulation.api.model.Settings) Background(org.drools.scenariosimulation.api.model.Background) Simulation(org.drools.scenariosimulation.api.model.Simulation) Assert.assertTrue(org.junit.Assert.assertTrue) Test(org.junit.Test) Path(org.uberfire.backend.vfs.Path) GIVEN(org.drools.scenariosimulation.api.model.FactMappingType.GIVEN) Background(org.drools.scenariosimulation.api.model.Background) Test(org.junit.Test)

Example 5 with Background

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

the class AbstractScenarioSimulationTest method setup.

@Before
public void setup() {
    settingsLocal = new Settings();
    backgroundLocal = new Background();
    scenarioWithIndexLocal = new ArrayList<>();
    scenarioGridWidgetSpy = spy(new ScenarioGridWidget() {

        {
            this.scenarioGridPanel = scenarioGridPanelMock;
        }
    });
    backgroundGridWidgetSpy = spy(new ScenarioGridWidget() {

        {
            this.scenarioGridPanel = backgroundGridPanelMock;
        }
    });
    when(simulationMock.getScesimModelDescriptor()).thenReturn(simulationDescriptorMock);
    when(simulationMock.getScenarioWithIndex()).thenReturn(scenarioWithIndexLocal);
    when(backgroundMock.getScesimModelDescriptor()).thenReturn(simulationDescriptorMock);
    when(simulationRunResultMock.getScenarioWithIndex()).thenReturn(scenarioWithIndexLocal);
    GridData.Range range = new GridData.Range(FIRST_INDEX_LEFT, FIRST_INDEX_RIGHT - 1);
    collectionEditorSingletonDOMElementFactoryTest = new CollectionEditorSingletonDOMElementFactory(scenarioGridPanelMock, scenarioGridLayerMock, scenarioGridMock, scenarioSimulationContextLocal, viewsProviderMock);
    scenarioCellTextAreaSingletonDOMElementFactorySpy = spy(new ScenarioCellTextAreaSingletonDOMElementFactory(scenarioGridPanelMock, scenarioGridLayerMock, scenarioGridMock));
    scenarioHeaderTextBoxSingletonDOMElementFactorySpy = spy(new ScenarioHeaderTextBoxSingletonDOMElementFactory(scenarioGridPanelMock, scenarioGridLayerMock, scenarioGridMock));
    scenarioExpressionCellTextAreaSingletonDOMElementFactorySpy = spy(new ScenarioExpressionCellTextAreaSingletonDOMElementFactory(scenarioGridPanelMock, scenarioGridLayerMock, scenarioGridMock));
    scenarioGridModelMock = spy(new ScenarioGridModel(false) {

        {
            this.abstractScesimModel = simulationMock;
            this.columns = gridColumns;
            this.rows = rowsMock;
            this.collectionEditorSingletonDOMElementFactory = collectionEditorSingletonDOMElementFactoryTest;
            this.scenarioCellTextAreaSingletonDOMElementFactory = scenarioCellTextAreaSingletonDOMElementFactorySpy;
            this.scenarioHeaderTextBoxSingletonDOMElementFactory = scenarioHeaderTextBoxSingletonDOMElementFactorySpy;
            this.scenarioExpressionCellTextAreaSingletonDOMElementFactory = scenarioExpressionCellTextAreaSingletonDOMElementFactorySpy;
            this.eventBus = eventBusMock;
        }

        @Override
        protected void commonAddColumn(int index, GridColumn<?> column) {
        // 
        }

        @Override
        protected void commonAddColumn(final int index, final GridColumn<?> column, ExpressionIdentifier ei) {
        // 
        }

        @Override
        protected void commonAddRow(int rowIndex) {
        // 
        }

        @Override
        public List<GridColumn<?>> getColumns() {
            return columns;
        }

        @Override
        public Range getInstanceLimits(int columnIndex) {
            return range;
        }

        @Override
        public int getFirstIndexLeftOfGroup(String groupName) {
            return FIRST_INDEX_LEFT;
        }

        @Override
        public int getFirstIndexRightOfGroup(String groupName) {
            return FIRST_INDEX_RIGHT;
        }

        @Override
        public GridColumn<?> getSelectedColumn() {
            return gridColumnMock;
        }

        @Override
        public void deleteColumn(final GridColumn<?> column) {
        // 
        }

        @Override
        public Range deleteRow(int rowIndex) {
            return range;
        }

        @Override
        public void insertRowGridOnly(final int rowIndex, final GridRow row, final Scenario scenario) {
        // 
        }

        @Override
        public void insertRow(int rowIndex, GridRow row) {
        }

        @Override
        public List<GridRow> getRows() {
            return rowsMock;
        }

        @Override
        public Range setCellValue(int rowIndex, int columnIndex, GridCellValue<?> value) {
            return range;
        }

        @Override
        public void validateInstanceHeaderUpdate(String instanceHeaderCellValue, int columnIndex, boolean isADataType) {
        // 
        }

        @Override
        public void validatePropertyHeaderUpdate(String propertyHeaderCellValue, int columnIndex, boolean isPropertyType) {
        // 
        }
    });
    when(scenarioGridMock.getEventBus()).thenReturn(eventBusMock);
    when(scenarioGridMock.getModel()).thenReturn(scenarioGridModelMock);
    when(scenarioGridMock.getLayer()).thenReturn(scenarioGridLayerMock);
    when(scenarioGridMock.getType()).thenReturn(ScenarioSimulationModel.Type.RULE);
    when(scenarioGridMock.getGridWidget()).thenReturn(GridWidget.SIMULATION);
    when(scenarioGridLayerMock.getScenarioGrid()).thenReturn(scenarioGridMock);
    when(scenarioGridPanelMock.getScenarioGridLayer()).thenReturn(scenarioGridLayerMock);
    when(scenarioGridPanelMock.getScenarioGrid()).thenReturn(scenarioGridMock);
    when(backgroundGridMock.getEventBus()).thenReturn(eventBusMock);
    when(backgroundGridMock.getModel()).thenReturn(backgroundGridModelMock);
    when(backgroundGridMock.getLayer()).thenReturn(backgroundGridLayerMock);
    when(backgroundGridMock.getType()).thenReturn(ScenarioSimulationModel.Type.RULE);
    when(backgroundGridMock.getGridWidget()).thenReturn(GridWidget.BACKGROUND);
    when(backgroundGridModelMock.getGridWidget()).thenReturn(GridWidget.BACKGROUND);
    when(backgroundGridLayerMock.getScenarioGrid()).thenReturn(backgroundGridMock);
    when(backgroundGridPanelMock.getScenarioGridLayer()).thenReturn(backgroundGridLayerMock);
    when(backgroundGridPanelMock.getScenarioGrid()).thenReturn(backgroundGridMock);
    final Point2D computedLocation = mock(Point2D.class);
    when(computedLocation.getX()).thenReturn(0.0);
    when(computedLocation.getY()).thenReturn(0.0);
    when(scenarioGridMock.getComputedLocation()).thenReturn(computedLocation);
    scenarioSimulationContextLocal = new ScenarioSimulationContext(scenarioGridWidgetSpy, backgroundGridWidgetSpy);
    scenarioSimulationContextLocal.setScenarioSimulationEditorPresenter(scenarioSimulationEditorPresenterMock);
    scenarioSimulationContextLocal.getStatus().setSimulation(simulationMock);
    scenarioSimulationContextLocal.getStatus().setBackground(backgroundMock);
    scenarioSimulationContextLocal.getStatus().setFullPackage(FULL_PACKAGE);
    scenarioSimulationContextLocal.setScenarioSimulationEditorPresenter(scenarioSimulationEditorPresenterMock);
    scenarioSimulationContextLocal.setDataObjectFieldsMap(dataObjectFieldsMapMock);
    when(backgroundGridWidgetSpy.getScenarioSimulationContext()).thenReturn(scenarioSimulationContextLocal);
    when(scenarioGridWidgetSpy.getScenarioSimulationContext()).thenReturn(scenarioSimulationContextLocal);
    when(scenarioSimulationEditorPresenterMock.getView()).thenReturn(scenarioSimulationViewMock);
    when(scenarioSimulationEditorPresenterMock.getModel()).thenReturn(scenarioSimulationModelMock);
    scenarioSimulationContextLocal.setScenarioSimulationEditorPresenter(scenarioSimulationEditorPresenterMock);
    when(scenarioSimulationEditorPresenterMock.getDataManagementStrategy()).thenReturn(dataManagementStrategyMock);
    when(scenarioSimulationEditorPresenterMock.getContext()).thenReturn(scenarioSimulationContextLocal);
    when(simulationMock.cloneModel()).thenReturn(clonedSimulationMock);
    when(backgroundMock.cloneModel()).thenReturn(clonedBackgroundMock);
    scenarioSimulationContextLocal.getStatus().setSimulation(simulationMock);
    when(scenarioSimulationModelMock.getSimulation()).thenReturn(simulationMock);
    when(scenarioSimulationModelMock.getBackground()).thenReturn(backgroundMock);
    when(scenarioSimulationModelMock.getSettings()).thenReturn(settingsLocal);
    when(scenarioCommandRegistryManagerMock.undo(scenarioSimulationContextLocal)).thenReturn(CommandResultBuilder.SUCCESS);
    when(scenarioCommandRegistryManagerMock.redo(scenarioSimulationContextLocal)).thenReturn(CommandResultBuilder.SUCCESS);
    appendRowCommandMock = spy(new AppendRowCommand(GridWidget.SIMULATION) {

        {
            this.restorableStatus = scenarioSimulationContextLocal.getStatus();
        }

        @Override
        public CommandResult<ScenarioSimulationViolation> execute(ScenarioSimulationContext context) {
            return CommandResultBuilder.SUCCESS;
        }

        @Override
        public CommandResult<ScenarioSimulationViolation> undo(ScenarioSimulationContext context) {
            return CommandResultBuilder.SUCCESS;
        }
    });
    when(informationHeaderMetaDataMock.getTitle()).thenReturn(MULTIPART_VALUE);
    when(informationHeaderMetaDataMock.getColumnGroup()).thenReturn(COLUMN_GROUP);
    when(propertyHeaderMetaDataMock.getMetadataType()).thenReturn(ScenarioHeaderMetaData.MetadataType.PROPERTY);
    when(propertyHeaderMetaDataMock.getTitle()).thenReturn(GRID_PROPERTY_TITLE);
    when(propertyHeaderMetaDataMock.getColumnGroup()).thenReturn(GRID_COLUMN_GROUP);
    when(propertyHeaderMetaDataMock.getColumnId()).thenReturn(GRID_COLUMN_ID);
    when(headerMetaDatasMock.get(anyInt())).thenReturn(informationHeaderMetaDataMock);
    when(gridColumnMock.getHeaderMetaData()).thenReturn(headerMetaDatasMock);
    when(gridColumnMock.getInformationHeaderMetaData()).thenReturn(informationHeaderMetaDataMock);
    when(gridColumnMock.getPropertyHeaderMetaData()).thenReturn(propertyHeaderMetaDataMock);
    when(gridColumnMock.getFactIdentifier()).thenReturn(factIdentifierMock);
    settingsLocal.setType(ScenarioSimulationModel.Type.RULE);
    IntStream.range(0, COLUMN_NUMBER).forEach(columnIndex -> {
        gridColumns.add(gridColumnMock);
        factMappingValuesLocal.add(factMappingValueMock);
        factIdentifierSet.add(factIdentifierMock);
        factMappingLocal.add(factMappingMock);
        when(simulationDescriptorMock.getFactMappingByIndex(columnIndex)).thenReturn(factMappingMock);
    });
    when(factIdentifierMock.getClassNameWithoutPackage()).thenReturn(CLASS_NAME);
    when(factIdentifierMock.getPackageWithoutClassName()).thenReturn(FULL_PACKAGE);
    when(factIdentifierMock.getClassName()).thenReturn(FULL_CLASS_NAME);
    when(factIdentifierMock.getName()).thenReturn(FACT_IDENTIFIER_NAME);
    when(simulationDescriptorMock.getFactIdentifiers()).thenReturn(factIdentifierSet);
    when(simulationDescriptorMock.getUnmodifiableFactMappings()).thenReturn(factMappingLocal);
    when(simulationDescriptorMock.getFactMappingsByFactName(anyString())).thenReturn(Stream.empty());
    when(scenarioGridModelMock.nextColumnCount()).thenReturn(factMappingValuesLocal.size());
    when(factMappingMock.getFactIdentifier()).thenReturn(factIdentifierMock);
    when(factMappingMock.getFactAlias()).thenReturn(FACT_ALIAS);
    when(factMappingMock.getGenericTypes()).thenReturn(new ArrayList<>());
    doReturn(factMappingMock).when(simulationDescriptorMock).addFactMapping(anyInt(), anyString(), anyObject(), anyObject());
    when(scenarioSimulationViewMock.getScenarioGridWidget()).thenReturn(scenarioGridWidgetSpy);
}
Also used : ScenarioSimulationContext(org.drools.workbench.screens.scenariosimulation.client.commands.ScenarioSimulationContext) AppendRowCommand(org.drools.workbench.screens.scenariosimulation.client.commands.actualcommands.AppendRowCommand) Background(org.drools.scenariosimulation.api.model.Background) Matchers.anyString(org.mockito.Matchers.anyString) GridCellValue(org.uberfire.ext.wires.core.grids.client.model.GridCellValue) GridRow(org.uberfire.ext.wires.core.grids.client.model.GridRow) Scenario(org.drools.scenariosimulation.api.model.Scenario) ScenarioCellTextAreaSingletonDOMElementFactory(org.drools.workbench.screens.scenariosimulation.client.factories.ScenarioCellTextAreaSingletonDOMElementFactory) ScenarioGridWidget(org.drools.workbench.screens.scenariosimulation.client.widgets.ScenarioGridWidget) ScenarioExpressionCellTextAreaSingletonDOMElementFactory(org.drools.workbench.screens.scenariosimulation.client.factories.ScenarioExpressionCellTextAreaSingletonDOMElementFactory) Point2D(com.ait.lienzo.client.core.types.Point2D) ScenarioGridModel(org.drools.workbench.screens.scenariosimulation.client.models.ScenarioGridModel) ExpressionIdentifier(org.drools.scenariosimulation.api.model.ExpressionIdentifier) GridData(org.uberfire.ext.wires.core.grids.client.model.GridData) GridColumn(org.uberfire.ext.wires.core.grids.client.model.GridColumn) ScenarioGridColumn(org.drools.workbench.screens.scenariosimulation.client.widgets.ScenarioGridColumn) ScenarioSimulationViolation(org.drools.workbench.screens.scenariosimulation.client.commands.ScenarioSimulationViolation) ScenarioHeaderTextBoxSingletonDOMElementFactory(org.drools.workbench.screens.scenariosimulation.client.factories.ScenarioHeaderTextBoxSingletonDOMElementFactory) Settings(org.drools.scenariosimulation.api.model.Settings) CollectionEditorSingletonDOMElementFactory(org.drools.workbench.screens.scenariosimulation.client.factories.CollectionEditorSingletonDOMElementFactory) Before(org.junit.Before)

Aggregations

Background (org.drools.scenariosimulation.api.model.Background)16 Simulation (org.drools.scenariosimulation.api.model.Simulation)10 Settings (org.drools.scenariosimulation.api.model.Settings)9 Test (org.junit.Test)8 Before (org.junit.Before)5 Path (org.uberfire.backend.vfs.Path)5 FactMapping (org.drools.scenariosimulation.api.model.FactMapping)4 ScenarioSimulationModel (org.drools.scenariosimulation.api.model.ScenarioSimulationModel)4 ScenarioWithIndex (org.drools.scenariosimulation.api.model.ScenarioWithIndex)3 ScesimModelDescriptor (org.drools.scenariosimulation.api.model.ScesimModelDescriptor)3 ScenarioSimulationContext (org.drools.workbench.screens.scenariosimulation.client.commands.ScenarioSimulationContext)3 List (java.util.List)2 AbstractScesimModel (org.drools.scenariosimulation.api.model.AbstractScesimModel)2 BackgroundData (org.drools.scenariosimulation.api.model.BackgroundData)2 BackgroundDataWithIndex (org.drools.scenariosimulation.api.model.BackgroundDataWithIndex)2 ExpressionIdentifier (org.drools.scenariosimulation.api.model.ExpressionIdentifier)2 GIVEN (org.drools.scenariosimulation.api.model.FactMappingType.GIVEN)2 OTHER (org.drools.scenariosimulation.api.model.FactMappingType.OTHER)2 Scenario (org.drools.scenariosimulation.api.model.Scenario)2 ScenarioGridWidget (org.drools.workbench.screens.scenariosimulation.client.widgets.ScenarioGridWidget)2