Search in sources :

Example 51 with DbSearchTerm

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));
}
Also used : Monitor(com.axway.ats.rbv.Monitor) DbStorage(com.axway.ats.rbv.db.DbStorage) SimpleMonitorListener(com.axway.ats.rbv.SimpleMonitorListener) DbSearchTerm(com.axway.ats.rbv.db.DbSearchTerm) ArrayList(java.util.ArrayList) DbFieldsRule(com.axway.ats.rbv.db.rules.DbFieldsRule) MockDbProvider(com.axway.ats.rbv.db.MockDbProvider) DbStringFieldRule(com.axway.ats.rbv.db.rules.DbStringFieldRule) Matchable(com.axway.ats.rbv.storage.Matchable) Test(org.junit.Test)

Aggregations

DbSearchTerm (com.axway.ats.rbv.db.DbSearchTerm)51 Test (org.junit.Test)50 BaseTest (com.axway.ats.rbv.BaseTest)42 DbVerification (com.axway.ats.rbv.clients.DbVerification)27 DbStorage (com.axway.ats.rbv.db.DbStorage)24 Matchable (com.axway.ats.rbv.storage.Matchable)22 MockDbProvider (com.axway.ats.rbv.db.MockDbProvider)9 Monitor (com.axway.ats.rbv.Monitor)8 SimpleMonitorListener (com.axway.ats.rbv.SimpleMonitorListener)8 DbFieldsRule (com.axway.ats.rbv.db.rules.DbFieldsRule)8 DbStringFieldRule (com.axway.ats.rbv.db.rules.DbStringFieldRule)8 ArrayList (java.util.ArrayList)8 PollingParameters (com.axway.ats.rbv.PollingParameters)4 MockDbEncryptor (com.axway.ats.rbv.db.MockDbEncryptor)4 MetaData (com.axway.ats.rbv.MetaData)2 RbvException (com.axway.ats.rbv.model.RbvException)1 Calendar (java.util.Calendar)1 Before (org.junit.Before)1