Search in sources :

Example 1 with FieldAction

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

the class FieldInspectorUpdateTest method makeAction.

private FieldAction makeAction(final Field field) {
    final FieldAction fieldAction = new FieldAction(field, mock(Column.class), new Values(11), configurationMock);
    final ArrayList<Action> actionsList = new ArrayList<>();
    actionsList.add(fieldAction);
    final Actions actions = new Actions(actionsList);
    when(field.getActions()).thenReturn(actions);
    return fieldAction;
}
Also used : FieldAction(org.drools.verifier.core.index.model.FieldAction) Action(org.drools.verifier.core.index.model.Action) Column(org.drools.verifier.core.index.model.Column) Actions(org.drools.verifier.core.index.model.Actions) Values(org.drools.verifier.core.index.keys.Values) ArrayList(java.util.ArrayList) FieldAction(org.drools.verifier.core.index.model.FieldAction)

Example 2 with FieldAction

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

the class ActionInspectorConflictResolverTest method testNoConflict003.

@Test
public void testNoConflict003() throws Exception {
    ActionInspector a = createSetActionInspector(new FieldAction(new Field(mock(ObjectField.class), "Person", "String", "name", new AnalyzerConfigurationMock()), mock(Column.class), new Values(true), new AnalyzerConfigurationMock()));
    ActionInspector b = createSetActionInspector(new FieldAction(new Field(mock(ObjectField.class), "Person", "String", "name", new AnalyzerConfigurationMock()), mock(Column.class), new Values(true), new AnalyzerConfigurationMock()));
    assertFalse(a.conflicts(b));
    assertFalse(b.conflicts(a));
}
Also used : ObjectField(org.drools.verifier.core.index.model.ObjectField) Field(org.drools.verifier.core.index.model.Field) AnalyzerConfigurationMock(org.drools.verifier.core.AnalyzerConfigurationMock) ObjectField(org.drools.verifier.core.index.model.ObjectField) Values(org.drools.verifier.core.index.keys.Values) FieldAction(org.drools.verifier.core.index.model.FieldAction) Test(org.junit.Test)

Aggregations

Values (org.drools.verifier.core.index.keys.Values)2 FieldAction (org.drools.verifier.core.index.model.FieldAction)2 ArrayList (java.util.ArrayList)1 AnalyzerConfigurationMock (org.drools.verifier.core.AnalyzerConfigurationMock)1 Action (org.drools.verifier.core.index.model.Action)1 Actions (org.drools.verifier.core.index.model.Actions)1 Column (org.drools.verifier.core.index.model.Column)1 Field (org.drools.verifier.core.index.model.Field)1 ObjectField (org.drools.verifier.core.index.model.ObjectField)1 Test (org.junit.Test)1