use of org.drools.workbench.screens.guided.rule.client.editor.factPattern.Connectives in project drools-wb by kiegroup.
the class OperatorsBaseTest method setUp.
@Before
public void setUp() throws Exception {
ApplicationPreferences.setUp(new HashMap() {
{
put(ApplicationPreferences.DATE_FORMAT, "dd/MM/YYYY");
}
});
serviceCaller = new CallerMock<>(service);
oracle = new AsyncPackageDataModelOracleImpl(serviceCaller, null);
final ModelField[] modelFields = new ModelField[] { modelField("street", DataType.TYPE_STRING), modelField("number", DataType.TYPE_NUMERIC_INTEGER) };
Map<String, ModelField[]> fields = new HashMap<>();
fields.put("org.Address", modelFields);
oracle.addModelFields(fields);
connectives = spy(new Connectives(modeller, eventBus, pattern, false));
doReturn(oracle).when(connectives).getDataModelOracle();
doReturn(oracle).when(modeller).getDataModelOracle();
doReturn(Stream.of(connectiveConstraint).toArray(ConnectiveConstraint[]::new)).when(singleFieldConstraint).getConnectives();
}
Aggregations