@Test public void retrieveFactModelTuple() { String factType = "factType"; ModelField[] modelFields = new ModelField[1]; when(oracleMock.getFieldCompletions(eq(factType))).thenReturn(modelFields); List<String> dataObjectsType = Arrays.asList(factType); SortedMap<String, FactModelTree> dataObjectsFieldMap = new TreeMap<>(); Map<String, String> superTypesMap = Collections.emptyMap(); List<String> javaSimpleType = new ArrayList<>(); kogitoDMODataManagementStrategySpy.manageDataObjects(dataObjectsType, superTypesMap, testToolsPresenterMock, 1, dataObjectsFieldMap, scenarioSimulationContextMock, javaSimpleType, gridWidgetMock); verify(oracleMock, times(1)).getFieldCompletions(eq(factType)); verify(kogitoDMODataManagementStrategySpy, times(1)).getFactModelTree(eq(factType), eq(superTypesMap), eq(modelFields)); verify(kogitoDMODataManagementStrategySpy, times(1)).aggregatorCallbackMethod(eq(testToolsPresenterMock), eq(1), eq(dataObjectsFieldMap), eq(scenarioSimulationContextMock), eq(factModelTreeMock), eq(javaSimpleType), eq(gridWidgetMock)); }
@Override protected void manageDataObjects(final List<String> dataObjectsTypes, final Map<String, String> superTypeMap, final TestToolsView.Presenter testToolsPresenter, final int expectedElements, final SortedMap<String, FactModelTree> dataObjectsFieldsMap, final ScenarioSimulationContext context, final List<String> simpleJavaTypes, final GridWidget gridWidget) { dataObjectsTypes.forEach(factType -> { ModelField[] retrieved = kogitoOracle.getFieldCompletions(factType); FactModelTree toSend = getFactModelTree(factType, superTypeMap, retrieved); aggregatorCallbackMethod(testToolsPresenter, expectedElements, dataObjectsFieldsMap, context, toSend, simpleJavaTypes, gridWidget); }); }
KogitoDMODataManagementStrategy extends AbstractDMODataManagementStrategy { @Override protected void manageDataObjects(final List<String> dataObjectsTypes, final Map<String, String> superTypeMap, final TestToolsView.Presenter testToolsPresenter, final int expectedElements, final SortedMap<String, FactModelTree> dataObjectsFieldsMap, final ScenarioSimulationContext context, final List<String> simpleJavaTypes, final GridWidget gridWidget) { dataObjectsTypes.forEach(factType -> { ModelField[] retrieved = kogitoOracle.getFieldCompletions(factType); FactModelTree toSend = getFactModelTree(factType, superTypeMap, retrieved); aggregatorCallbackMethod(testToolsPresenter, expectedElements, dataObjectsFieldsMap, context, toSend, simpleJavaTypes, gridWidget); }); } }
KogitoDMODataManagementStrategy extends AbstractDMODataManagementStrategy { @Override protected void manageDataObjects(final List<String> dataObjectsTypes, final Map<String, String> superTypeMap, final TestToolsView.Presenter testToolsPresenter, final int expectedElements, final SortedMap<String, FactModelTree> dataObjectsFieldsMap, final ScenarioSimulationContext context, final List<String> simpleJavaTypes, final GridWidget gridWidget) { dataObjectsTypes.forEach(factType -> { ModelField[] retrieved = kogitoOracle.getFieldCompletions(factType); FactModelTree toSend = getFactModelTree(factType, superTypeMap, retrieved); aggregatorCallbackMethod(testToolsPresenter, expectedElements, dataObjectsFieldsMap, context, toSend, simpleJavaTypes, gridWidget); }); } KogitoDMODataManagementStrategy(KogitoAsyncPackageDataModelOracle kogitoOracle); }
KogitoDMODataManagementStrategy extends AbstractDMODataManagementStrategy { @Override protected void manageDataObjects(final List<String> dataObjectsTypes, final Map<String, String> superTypeMap, final TestToolsView.Presenter testToolsPresenter, final int expectedElements, final SortedMap<String, FactModelTree> dataObjectsFieldsMap, final ScenarioSimulationContext context, final List<String> simpleJavaTypes, final GridWidget gridWidget) { dataObjectsTypes.forEach(factType -> { ModelField[] retrieved = kogitoOracle.getFieldCompletions(factType); FactModelTree toSend = getFactModelTree(factType, superTypeMap, retrieved); aggregatorCallbackMethod(testToolsPresenter, expectedElements, dataObjectsFieldsMap, context, toSend, simpleJavaTypes, gridWidget); }); } KogitoDMODataManagementStrategy(KogitoAsyncPackageDataModelOracle kogitoOracle); @Override void manageScenarioSimulationModelContent(ObservablePath currentPath, ScenarioSimulationModelContent toManage); @Override boolean isADataType(String value); }
KogitoDMODataManagementStrategy extends AbstractDMODataManagementStrategy { @Override protected void manageDataObjects(final List<String> dataObjectsTypes, final Map<String, String> superTypeMap, final TestToolsView.Presenter testToolsPresenter, final int expectedElements, final SortedMap<String, FactModelTree> dataObjectsFieldsMap, final ScenarioSimulationContext context, final List<String> simpleJavaTypes, final GridWidget gridWidget) { dataObjectsTypes.forEach(factType -> { ModelField[] retrieved = kogitoOracle.getFieldCompletions(factType); FactModelTree toSend = getFactModelTree(factType, superTypeMap, retrieved); aggregatorCallbackMethod(testToolsPresenter, expectedElements, dataObjectsFieldsMap, context, toSend, simpleJavaTypes, gridWidget); }); } KogitoDMODataManagementStrategy(KogitoAsyncPackageDataModelOracle kogitoOracle); @Override void manageScenarioSimulationModelContent(ObservablePath currentPath, ScenarioSimulationModelContent toManage); @Override boolean isADataType(String value);  }