Search in sources :

Example 11 with Coordinate

use of org.drools.workbench.services.verifier.plugin.client.Coordinate in project drools-wb by kiegroup.

the class DTableUpdateManagerIsNullTest method testTrueDidNotChange.

@Test
public void testTrueDidNotChange() throws Exception, UpdateException {
    ArrayList<Coordinate> coordinates = new ArrayList<>();
    coordinates.add(new Coordinate(0, 2));
    updateManager.update(table52, coordinates);
    verify(analyzer, never()).update(anySet());
}
Also used : Coordinate(org.drools.workbench.services.verifier.plugin.client.Coordinate) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Example 12 with Coordinate

use of org.drools.workbench.services.verifier.plugin.client.Coordinate in project drools-wb by kiegroup.

the class DTableUpdateManagerTest method testFillNullActionWithNull.

@Test
public void testFillNullActionWithNull() throws Exception, UpdateException {
    ArrayList<Coordinate> coordinates = new ArrayList<Coordinate>();
    Coordinate coordinate = new Coordinate(1, 3);
    coordinates.add(coordinate);
    table52.getData().get(1).get(3).setBooleanValue(null);
    updateManager.update(table52, coordinates);
    verify(analyzer, never()).update(anySet());
}
Also used : Coordinate(org.drools.workbench.services.verifier.plugin.client.Coordinate) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Example 13 with Coordinate

use of org.drools.workbench.services.verifier.plugin.client.Coordinate in project drools-wb by kiegroup.

the class DTableUpdateManagerTest method testDoNotUpdateActionWhenValueDidNotChange.

@Test
public void testDoNotUpdateActionWhenValueDidNotChange() throws Exception, UpdateException {
    ArrayList<Coordinate> coordinates = new ArrayList<Coordinate>();
    coordinates.add(new Coordinate(0, 3));
    updateManager.update(table52, coordinates);
    verify(analyzer, never()).update(anySet());
}
Also used : Coordinate(org.drools.workbench.services.verifier.plugin.client.Coordinate) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Example 14 with Coordinate

use of org.drools.workbench.services.verifier.plugin.client.Coordinate in project drools-wb by kiegroup.

the class DTableUpdateManagerTest method testDoNotUpdateConditionWhenValueDidNotChange.

@Test
public void testDoNotUpdateConditionWhenValueDidNotChange() throws Exception, UpdateException {
    ArrayList<Coordinate> coordinates = new ArrayList<Coordinate>();
    coordinates.add(new Coordinate(1, 2));
    updateManager.update(table52, coordinates);
    verify(analyzer, never()).update(anySet());
}
Also used : Coordinate(org.drools.workbench.services.verifier.plugin.client.Coordinate) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Example 15 with Coordinate

use of org.drools.workbench.services.verifier.plugin.client.Coordinate in project drools-wb by kiegroup.

the class DTableUpdateManagerTest method testDoNotUpdateWhenDescriptionChanges.

@Test
public void testDoNotUpdateWhenDescriptionChanges() throws Exception, UpdateException {
    ArrayList<Coordinate> coordinates = new ArrayList<Coordinate>();
    coordinates.add(new Coordinate(1, 1));
    updateManager.update(table52, coordinates);
    verify(analyzer, never()).update(any(Set.class));
}
Also used : Set(java.util.Set) Mockito.anySet(org.mockito.Mockito.anySet) Coordinate(org.drools.workbench.services.verifier.plugin.client.Coordinate) ArrayList(java.util.ArrayList) Test(org.junit.Test)

Aggregations

Coordinate (org.drools.workbench.services.verifier.plugin.client.Coordinate)22 ArrayList (java.util.ArrayList)21 Test (org.junit.Test)19 GuidedDecisionTable52 (org.drools.workbench.models.guided.dtable.shared.model.GuidedDecisionTable52)3 Analyzer (org.drools.workbench.services.verifier.core.main.Analyzer)3 HashSet (java.util.HashSet)1 Set (java.util.Set)1 Mockito.anySet (org.mockito.Mockito.anySet)1