Search in sources :

Example 21 with DbVerification

use of com.axway.ats.rbv.clients.DbVerification in project ats-framework by Axway.

the class Test_DbVerification method checkFieldValueDoesNotEqualStringNegative.

@Test
public void checkFieldValueDoesNotEqualStringNegative() throws RbvException {
    DbVerification fsVerification = new DbVerification(new DbSearchTerm(""), provider);
    fsVerification.checkFieldValueDoesNotEqual("", "key1", "value1");
    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 22 with DbVerification

use of com.axway.ats.rbv.clients.DbVerification in project ats-framework by Axway.

the class Test_DbVerification method checkFieldValueEqualsNumericPositive.

@Test
public void checkFieldValueEqualsNumericPositive() throws RbvException {
    DbVerification fsVerification = new DbVerification(new DbSearchTerm(""), provider);
    fsVerification.checkFieldValueEquals("numeric", "key", 0);
    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 23 with DbVerification

use of com.axway.ats.rbv.clients.DbVerification in project ats-framework by Axway.

the class Test_DbVerification method checkFieldValueEqualsBinaryPositive.

@Test
public void checkFieldValueEqualsBinaryPositive() throws RbvException {
    DbVerification fsVerification = new DbVerification(new DbSearchTerm(""), provider);
    fsVerification.checkFieldValueEquals("binary", "key", new byte[] { 1, 2, 0 });
    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 24 with DbVerification

use of com.axway.ats.rbv.clients.DbVerification in project ats-framework by Axway.

the class Test_DbVerification method checkFieldValueEqualsBinaryNegative.

@Test(expected = RbvVerificationException.class)
public void checkFieldValueEqualsBinaryNegative() throws RbvException {
    DbVerification fsVerification = new DbVerification(new DbSearchTerm(""), provider);
    fsVerification.checkFieldValueEquals("binary", "key", new byte[] { 1 });
    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 25 with DbVerification

use of com.axway.ats.rbv.clients.DbVerification in project ats-framework by Axway.

the class Test_DbVerification method checkDencryptorIsUnsetPositive.

@Test
public void checkDencryptorIsUnsetPositive() 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");
    // remove the encryptor
    fsVerification.setDbEncryptor(null);
    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)

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