use of org.drools.workbench.services.verifier.plugin.client.Coordinate in project drools-wb by kiegroup.
the class DTableUpdateManagerTest method testSetBooleanActionToNewBoolean.
@Test
public void testSetBooleanActionToNewBoolean() throws Exception, UpdateException {
final ArrayList<Coordinate> coordinates = new ArrayList<Coordinate>();
final Coordinate coordinate = new Coordinate(0, 3);
coordinates.add(coordinate);
table52.getData().get(0).get(3).setBooleanValue(false);
updateManager.update(table52, coordinates);
verify(analyzer).update(anySet());
}
use of org.drools.workbench.services.verifier.plugin.client.Coordinate in project drools-wb by kiegroup.
the class DTableUpdateManagerTest method testSetActionToNull.
@Test
public void testSetActionToNull() throws Exception, UpdateException {
ArrayList<Coordinate> coordinates = new ArrayList<Coordinate>();
Coordinate coordinate = new Coordinate(0, 3);
coordinates.add(coordinate);
table52.getData().get(0).get(3).setBooleanValue(null);
updateManager.update(table52, coordinates);
verify(analyzer).update(anySet());
}
use of org.drools.workbench.services.verifier.plugin.client.Coordinate in project drools-wb by kiegroup.
the class DTableUpdateManagerTest method testSetIntegerConditionToNewInteger.
@Test
public void testSetIntegerConditionToNewInteger() throws Exception, UpdateException {
ArrayList<Coordinate> coordinates = new ArrayList<Coordinate>();
Coordinate coordinate = new Coordinate(0, 2);
coordinates.add(coordinate);
table52.getData().get(0).get(2).setNumericValue(123);
updateManager.update(table52, coordinates);
verify(analyzer).update(anySet());
}
use of org.drools.workbench.services.verifier.plugin.client.Coordinate in project drools-wb by kiegroup.
the class DTableUpdateManagerTest method testFillNullCondition.
@Test
public void testFillNullCondition() throws Exception, UpdateException {
ArrayList<Coordinate> coordinates = new ArrayList<Coordinate>();
Coordinate coordinate = new Coordinate(1, 2);
coordinates.add(coordinate);
table52.getData().get(1).get(2).setNumericValue(123);
updateManager.update(table52, coordinates);
verify(analyzer).update(anySet());
}
use of org.drools.workbench.services.verifier.plugin.client.Coordinate in project drools-wb by kiegroup.
the class DecisionTableAnalyzerFromFileTest method testFileLargeFileGDSTWithDeletes.
@Test
public void testFileLargeFileGDSTWithDeletes() throws Exception, UpdateException {
final String xml = loadResource("Large file.gdst");
final GuidedDecisionTable52 table52 = GuidedDTXMLPersistence.getInstance().unmarshal(xml);
final Analyzer analyzer = analyzerProvider.makeAnalyser(table52);
analyzer.resetChecks();
analyzer.analyze();
assertOnlyContains(analyzerProvider.getAnalysisReport(), SINGLE_HIT_LOST, EMPTY_RULE);
long baseline = System.currentTimeMillis();
for (int iterations = 0; iterations < 10; iterations++) {
analyzer.removeRule(100);
table52.getData().remove(100);
List<Coordinate> canBeUpdated = new ArrayList<>();
canBeUpdated.add(new Coordinate(0, 0));
analyzerProvider.getUpdateManager(table52, analyzer).update(table52, canBeUpdated);
long now = System.currentTimeMillis();
System.out.println("Partial analysis took.. " + (now - baseline) + " ms");
baseline = now;
assertOnlyContains(analyzerProvider.getAnalysisReport(), SINGLE_HIT_LOST, EMPTY_RULE);
}
}
Aggregations