Search in sources :

Example 1 with DbVerification

use of com.axway.ats.rbv.clients.DbVerification 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 2 with DbVerification

use of com.axway.ats.rbv.clients.DbVerification 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 3 with DbVerification

use of com.axway.ats.rbv.clients.DbVerification 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 4 with DbVerification

use of com.axway.ats.rbv.clients.DbVerification 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 5 with DbVerification

use of com.axway.ats.rbv.clients.DbVerification 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

BaseTest (com.axway.ats.rbv.BaseTest)27 DbVerification (com.axway.ats.rbv.clients.DbVerification)27 DbSearchTerm (com.axway.ats.rbv.db.DbSearchTerm)27 Test (org.junit.Test)27 MockDbEncryptor (com.axway.ats.rbv.db.MockDbEncryptor)4 RbvException (com.axway.ats.rbv.model.RbvException)1 Calendar (java.util.Calendar)1