Search in sources :

Example 26 with DbSearchTerm

use of com.axway.ats.rbv.db.DbSearchTerm in project ats-framework by Axway.

the class Test_DbVerification method checkFieldValueDoesNotContainPositive.

@Test
public void checkFieldValueDoesNotContainPositive() throws RbvException {
    DbVerification fsVerification = new DbVerification(new DbSearchTerm(""), provider);
    fsVerification.checkFieldValueDoesNotContain("", "key1", "val1");
    fsVerification.verifyDbDataExists();
}
Also used : DbSearchTerm(com.axway.ats.rbv.db.DbSearchTerm) DbVerification(com.axway.ats.rbv.clients.DbVerification) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Example 27 with DbSearchTerm

use of com.axway.ats.rbv.db.DbSearchTerm in project ats-framework by Axway.

the class Test_DbVerification method checkFieldValueRegexDoesNotMatchPositive.

@Test
public void checkFieldValueRegexDoesNotMatchPositive() throws RbvException {
    DbVerification fsVerification = new DbVerification(new DbSearchTerm(""), provider);
    fsVerification.checkFieldValueRegexDoesNotMatch("", "key1", "val1.*");
    fsVerification.verifyDbDataExists();
}
Also used : DbSearchTerm(com.axway.ats.rbv.db.DbSearchTerm) DbVerification(com.axway.ats.rbv.clients.DbVerification) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Example 28 with DbSearchTerm

use of com.axway.ats.rbv.db.DbSearchTerm in project ats-framework by Axway.

the class Test_DbVerification method checkDencryptorIsUnsetNegative.

@Test(expected = RbvVerificationException.class)
public void checkDencryptorIsUnsetNegative() throws RbvException {
    DbVerification fsVerification = new DbVerification(new DbSearchTerm(""), provider);
    fsVerification.checkFieldValueEquals("asd", "key0", "value00");
    // the mock encryptor changes all letters to capital case
    fsVerification.setDbEncryptor(new MockDbEncryptor());
    fsVerification.checkFieldValueEquals("", "key1", "VALUE00");
    // did not remove the encryptor, this will result in error in the next check
    fsVerification.checkFieldValueEquals("", "key2", "value00");
    fsVerification.verifyDbDataExists();
}
Also used : MockDbEncryptor(com.axway.ats.rbv.db.MockDbEncryptor) DbSearchTerm(com.axway.ats.rbv.db.DbSearchTerm) DbVerification(com.axway.ats.rbv.clients.DbVerification) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Example 29 with DbSearchTerm

use of com.axway.ats.rbv.db.DbSearchTerm in project ats-framework by Axway.

the class Test_DbVerification method checkFieldValueDoesNotEqualNumericPositive.

@Test
public void checkFieldValueDoesNotEqualNumericPositive() throws RbvException {
    DbVerification fsVerification = new DbVerification(new DbSearchTerm(""), provider);
    fsVerification.checkFieldValueDoesNotEqual("numeric", "key", 23);
    fsVerification.verifyDbDataExists();
}
Also used : DbSearchTerm(com.axway.ats.rbv.db.DbSearchTerm) DbVerification(com.axway.ats.rbv.clients.DbVerification) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Example 30 with DbSearchTerm

use of com.axway.ats.rbv.db.DbSearchTerm in project ats-framework by Axway.

the class Test_DbVerification method checkFieldValueBooleanPositive.

@Test
public void checkFieldValueBooleanPositive() throws RbvException {
    DbVerification verificator = new DbVerification(new DbSearchTerm(""), provider);
    verificator.checkFieldValueEquals("boolean", "keyNumber", true);
    verificator.checkFieldValueEquals("boolean", "keyString", false);
    verificator.verifyDbDataExists();
}
Also used : DbSearchTerm(com.axway.ats.rbv.db.DbSearchTerm) DbVerification(com.axway.ats.rbv.clients.DbVerification) BaseTest(com.axway.ats.rbv.BaseTest) 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