Search in sources :

Example 1 with Conditions

use of org.drools.verifier.core.index.model.Conditions in project drools by kiegroup.

the class FieldInspectorUpdateTest method makeCondition.

private FieldCondition makeCondition(final Field field) {
    final FieldCondition fieldAction = new FieldCondition(field, mock(Column.class), "==", new Values(11), configurationMock);
    final ArrayList<Condition> actionsList = new ArrayList<>();
    actionsList.add(fieldAction);
    final Conditions conditions = new Conditions(actionsList);
    when(field.getConditions()).thenReturn(conditions);
    return fieldAction;
}
Also used : Condition(org.drools.verifier.core.index.model.Condition) FieldCondition(org.drools.verifier.core.index.model.FieldCondition) FieldCondition(org.drools.verifier.core.index.model.FieldCondition) Column(org.drools.verifier.core.index.model.Column) Values(org.drools.verifier.core.index.keys.Values) ArrayList(java.util.ArrayList) Conditions(org.drools.verifier.core.index.model.Conditions)

Example 2 with Conditions

use of org.drools.verifier.core.index.model.Conditions in project drools by kiegroup.

the class ConditionsListenerTest method setUp.

@Before
public void setUp() throws Exception {
    configuration = new AnalyzerConfigurationMock();
    conditions = new Conditions();
    allListener = mock(AllListener.class);
    conditions.where(Condition.value().any()).listen().all(allListener);
}
Also used : AllListener(org.drools.verifier.core.index.select.AllListener) AnalyzerConfigurationMock(org.drools.verifier.core.AnalyzerConfigurationMock) Conditions(org.drools.verifier.core.index.model.Conditions) Before(org.junit.Before)

Aggregations

Conditions (org.drools.verifier.core.index.model.Conditions)2 ArrayList (java.util.ArrayList)1 AnalyzerConfigurationMock (org.drools.verifier.core.AnalyzerConfigurationMock)1 Values (org.drools.verifier.core.index.keys.Values)1 Column (org.drools.verifier.core.index.model.Column)1 Condition (org.drools.verifier.core.index.model.Condition)1 FieldCondition (org.drools.verifier.core.index.model.FieldCondition)1 AllListener (org.drools.verifier.core.index.select.AllListener)1 Before (org.junit.Before)1