use of com.axway.ats.rbv.db.DbSearchTerm in project ats-framework by Axway.
the class Test_SimpleMonitorListener method evaluateMonitorsMultipleMonitorsPositive.
@Test
public void evaluateMonitorsMultipleMonitorsPositive() throws RbvException {
DbStorage storage = new DbStorage(new MockDbProvider());
Matchable matchable1 = storage.getFolder(new DbSearchTerm(""));
Matchable matchable2 = storage.getFolder(new DbSearchTerm(""));
Matchable matchable3 = storage.getFolder(new DbSearchTerm(""));
DbFieldsRule dbRule = new DbStringFieldRule("", "key1", "value10", MatchRelation.EQUALS, "evaluateMonitorsMultipleMonitorsPositive", true);
Monitor monitor1 = new Monitor("monitor1", matchable1, dbRule, pollingParams, true, false, false);
Monitor monitor2 = new Monitor("monitor2", matchable2, dbRule, pollingParams, true, false, false);
Monitor monitor3 = new Monitor("monitor3", matchable3, dbRule, pollingParams, true, false, false);
List<Monitor> monitors = new ArrayList<Monitor>();
monitors.add(monitor1);
monitors.add(monitor2);
monitors.add(monitor3);
SimpleMonitorListener listener = new SimpleMonitorListener(monitors);
assertTrue(listener.evaluateMonitors(TIME_END_POLL));
}
Aggregations