Search in sources :

Example 1 with Values

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

the class ConditionTest method changeValue.

@Test
public void changeValue() throws Exception {
    condition.setValue(new Values(2));
    assertEquals(1, condition.getValues().size());
    assertEquals(2, condition.getValues().iterator().next());
}
Also used : Values(org.drools.workbench.services.verifier.api.client.index.keys.Values) Test(org.junit.Test)

Example 2 with Values

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

the class ValuesResolver method getValues.

public Values getValues() throws ValueResolveException {
    final String type = getType();
    final Values values = getValues(type);
    Logger.add("ConditionCol: " + ToString.toString(conditionColumn) + " realCellValue: " + ToString.toString(realCellValue) + " type: " + type + " values: " + values.toString());
    return values;
}
Also used : Values(org.drools.workbench.services.verifier.api.client.index.keys.Values)

Example 3 with Values

use of org.drools.workbench.services.verifier.api.client.index.keys.Values in project drools-wb 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 : FieldCondition(org.drools.workbench.services.verifier.api.client.index.FieldCondition) Condition(org.drools.workbench.services.verifier.api.client.index.Condition) FieldCondition(org.drools.workbench.services.verifier.api.client.index.FieldCondition) Column(org.drools.workbench.services.verifier.api.client.index.Column) Values(org.drools.workbench.services.verifier.api.client.index.keys.Values) ArrayList(java.util.ArrayList) Conditions(org.drools.workbench.services.verifier.api.client.index.Conditions)

Example 4 with Values

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

the class FieldInspectorUpdateTest method updateAction.

@Test
public void updateAction() throws Exception {
    fieldAction.setValue(new Values(20));
    verify(ruleInspectorUpdater).resetActionsInspectors();
}
Also used : Values(org.drools.workbench.services.verifier.api.client.index.keys.Values) Test(org.junit.Test)

Example 5 with Values

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

the class ActionTest method changeValue.

@Test
public void changeValue() throws Exception {
    action.setValue(new Values(false));
    assertEquals(1, action.getValues().size());
    assertEquals(false, action.getValues().iterator().next());
}
Also used : Values(org.drools.workbench.services.verifier.api.client.index.keys.Values) Test(org.junit.Test)

Aggregations

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