use of com.axway.ats.rbv.db.DbStorage in project ats-framework by Axway.
the class Test_SimpleMonitorListener method evaluateMonitorsMultipleMonitorsEndOnFirstMatchNegative.
@Test
public void evaluateMonitorsMultipleMonitorsEndOnFirstMatchNegative() 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 dbRuleRight = new DbStringFieldRule("", "key1", "value10", MatchRelation.EQUALS, "evaluateMonitorsMultipleMonitorsEndOnFirstMatchNegative1", true);
DbFieldsRule dbRuleWrong = new DbStringFieldRule("", "table1", "value10", MatchRelation.EQUALS, "evaluateMonitorsMultipleMonitorsEndOnFirstMatchNegative2", true);
Monitor monitor1 = new Monitor("monitor1", matchable1, dbRuleRight, pollingParams, true, true, false);
Monitor monitor2 = new Monitor("monitor2", matchable2, dbRuleRight, pollingParams, true, true, false);
Monitor monitor3 = new Monitor("monitor3", matchable3, dbRuleWrong, pollingParams, true, true, false);
List<Monitor> monitors = new ArrayList<Monitor>();
monitors.add(monitor1);
monitors.add(monitor2);
monitors.add(monitor3);
SimpleMonitorListener listener = new SimpleMonitorListener(monitors);
assertFalse(listener.evaluateMonitors(TIME_END_POLL));
}
use of com.axway.ats.rbv.db.DbStorage in project ats-framework by Axway.
the class Test_SimpleMonitorListener method beforeMethod.
@Before
public void beforeMethod() throws RbvException {
pollingParams = new PollingParameters(0, POLLING_INTERVAL, POLLING_ATTEMPTS);
mockDbProvider = new MockDbProvider();
DbStorage storage = new DbStorage(mockDbProvider);
matchable = storage.getFolder(new DbSearchTerm(""));
}
use of com.axway.ats.rbv.db.DbStorage in project ats-framework by Axway.
the class Test_SimpleMonitorListener method evaluateMonitorsMultipleMonitorsNegative.
@Test
public void evaluateMonitorsMultipleMonitorsNegative() 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 dbRuleRight = new DbStringFieldRule("", "key1", "value10", MatchRelation.EQUALS, "evaluateMonitorsMultipleMonitorsNegative1", true);
DbFieldsRule dbRuleWrong = new DbStringFieldRule("", "table1", "value10", MatchRelation.EQUALS, "evaluateMonitorsMultipleMonitorsNegative2", true);
Monitor monitor1 = new Monitor("monitor1", matchable1, dbRuleRight, pollingParams, true, false, false);
Monitor monitor2 = new Monitor("monitor2", matchable2, dbRuleRight, pollingParams, true, false, false);
Monitor monitor3 = new Monitor("monitor3", matchable3, dbRuleWrong, pollingParams, true, false, false);
List<Monitor> monitors = new ArrayList<Monitor>();
monitors.add(monitor1);
monitors.add(monitor2);
monitors.add(monitor3);
SimpleMonitorListener listener = new SimpleMonitorListener(monitors);
assertFalse(listener.evaluateMonitors(TIME_END_POLL));
}
use of com.axway.ats.rbv.db.DbStorage in project ats-framework by Axway.
the class Test_DbStorage method getFolderWithSearchTerm.
@Test
public void getFolderWithSearchTerm() throws RbvStorageException {
DbStorage storage = new DbStorage(new MockDbProvider());
assertNotNull(storage.getFolder(new DbSearchTerm("")));
}
use of com.axway.ats.rbv.db.DbStorage in project ats-framework by Axway.
the class Test_DbFolder method getDescription.
@Test
public void getDescription() throws RbvException {
DbStorage storage = new DbStorage(new MockDbProvider());
Matchable folder = storage.getFolder(new DbSearchTerm(""));
folder.getDescription();
}
Aggregations