use of com.axway.ats.rbv.db.MockDbEncryptor 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();
}
use of com.axway.ats.rbv.db.MockDbEncryptor in project ats-framework by Axway.
the class Test_DbVerification method checkFieldValueEqualsEncryptedStringNegative.
@Test(expected = RbvVerificationException.class)
public void checkFieldValueEqualsEncryptedStringNegative() throws RbvException {
DbVerification fsVerification = new DbVerification(new DbSearchTerm(""), provider);
// the mock encryptor changes all letters to capital case
fsVerification.setDbEncryptor(new MockDbEncryptor());
fsVerification.checkFieldValueEquals("", "key1", "VaLUE00");
fsVerification.verifyDbDataExists();
}
use of com.axway.ats.rbv.db.MockDbEncryptor 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();
}
use of com.axway.ats.rbv.db.MockDbEncryptor in project ats-framework by Axway.
the class Test_DbVerification method checkFieldValueEqualsEncryptedStringPositive.
@Test
public void checkFieldValueEqualsEncryptedStringPositive() throws RbvException {
DbVerification fsVerification = new DbVerification(new DbSearchTerm(""), provider);
// the mock encryptor changes all letters to capital case
fsVerification.setDbEncryptor(new MockDbEncryptor());
fsVerification.checkFieldValueEquals("", "key1", "VALUE00");
fsVerification.verifyDbDataExists();
}
Aggregations