Search in sources :

Example 1 with Coordinate

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

the class DTableUpdateManagerRetractTest 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 2 with Coordinate

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

the class AnalyzerUpdateTestBase method getUpdates.

protected List<Coordinate> getUpdates(final int x, final int y) {
    final List<Coordinate> updates = new ArrayList<>();
    updates.add(new Coordinate(x, y));
    return updates;
}
Also used : Coordinate(org.drools.workbench.services.verifier.plugin.client.Coordinate) ArrayList(java.util.ArrayList)

Example 3 with Coordinate

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

the class DTableUpdateManagerIsNullTest method testNullDidNotChange.

@Test
public void testNullDidNotChange() throws Exception, UpdateException {
    ArrayList<Coordinate> coordinates = new ArrayList<>();
    coordinates.add(new Coordinate(2, 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 4 with Coordinate

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

the class DTableUpdateManagerIsNullTest method testFalseDidNotChange.

@Test
public void testFalseDidNotChange() throws Exception, UpdateException {
    ArrayList<Coordinate> coordinates = new ArrayList<>();
    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 5 with Coordinate

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

the class DTableUpdateManagerIsNullTest method set.

private void set(final int row, final int col, final Boolean value) throws UpdateException {
    final ArrayList<Coordinate> coordinates = new ArrayList<>();
    final Coordinate coordinate = new Coordinate(row, col);
    coordinates.add(coordinate);
    table52.getData().get(row).get(col).setBooleanValue(value);
    updateManager.update(table52, coordinates);
}
Also used : Coordinate(org.drools.workbench.services.verifier.plugin.client.Coordinate) ArrayList(java.util.ArrayList)

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