Search in sources :

Example 1 with FieldAction

use of org.drools.workbench.services.verifier.api.client.index.FieldAction in project drools-wb by kiegroup.

the class FieldInspectorUpdateTest method makeAction.

private FieldAction makeAction(final Field field) {
    final FieldAction fieldAction = new FieldAction(field, mock(Column.class), DataType.DataTypes.NUMERIC, 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.workbench.services.verifier.api.client.index.FieldAction) Action(org.drools.workbench.services.verifier.api.client.index.Action) Column(org.drools.workbench.services.verifier.api.client.index.Column) Actions(org.drools.workbench.services.verifier.api.client.index.Actions) Values(org.drools.workbench.services.verifier.api.client.index.keys.Values) ArrayList(java.util.ArrayList) FieldAction(org.drools.workbench.services.verifier.api.client.index.FieldAction)

Example 2 with FieldAction

use of org.drools.workbench.services.verifier.api.client.index.FieldAction in project drools-wb 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), DataType.DataTypes.BOOLEAN, new Values(true), new AnalyzerConfigurationMock()));
    ActionInspector b = createSetActionInspector(new FieldAction(new Field(mock(ObjectField.class), "Person", "String", "name", new AnalyzerConfigurationMock()), mock(Column.class), DataType.DataTypes.STRING, new Values(true), new AnalyzerConfigurationMock()));
    assertFalse(a.conflicts(b));
    assertFalse(b.conflicts(a));
}
Also used : ObjectField(org.drools.workbench.services.verifier.api.client.index.ObjectField) Field(org.drools.workbench.services.verifier.api.client.index.Field) AnalyzerConfigurationMock(org.drools.workbench.services.verifier.core.checks.AnalyzerConfigurationMock) ObjectField(org.drools.workbench.services.verifier.api.client.index.ObjectField) Values(org.drools.workbench.services.verifier.api.client.index.keys.Values) FieldAction(org.drools.workbench.services.verifier.api.client.index.FieldAction) Test(org.junit.Test)

Aggregations

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