use of com.axway.ats.rbv.db.DbMetaData in project ats-framework by Axway.
the class Test_DbBinaryFieldRule method isMatchIncorrectMetaData.
@Test(expected = MetaDataIncorrectException.class)
public void isMatchIncorrectMetaData() throws RbvException {
DbMetaData metaData = new DbMetaData();
metaData.putProperty("table.column", "asdasd");
ruleTest1ExpectFalse.isMatch(metaData);
}
use of com.axway.ats.rbv.db.DbMetaData in project ats-framework by Axway.
the class Test_DbBinaryFieldRule method isMatchExpectedTrueNegative.
@Test
public void isMatchExpectedTrueNegative() throws RbvException {
DbMetaData metaData = new DbMetaData();
metaData.putProperty("table.column", new byte[] { 0, 22 });
assertFalse(ruleTest1ExpectTrue.isMatch(metaData));
}
use of com.axway.ats.rbv.db.DbMetaData in project ats-framework by Axway.
the class Test_DbNumericFieldRule method isMatchExpectedFalseMultipleRulesNegative.
@Test
public void isMatchExpectedFalseMultipleRulesNegative() throws RbvException {
DbMetaData metaData = new DbMetaData();
metaData.putProperty("table.column", 2);
metaData.putProperty("table.column2", 5);
AndRuleOperation andRule = new AndRuleOperation();
andRule.addRule(ruleTest1ExpectFalse);
andRule.addRule(ruleTest2ExpectFalse);
assertFalse(andRule.isMatch(metaData));
}
use of com.axway.ats.rbv.db.DbMetaData in project ats-framework by Axway.
the class Test_DbNumericFieldRule method isMatchExpectedFalseMultipleRulesPositiveNoMetaData.
@Test(expected = NoSuchMetaDataKeyException.class)
public void isMatchExpectedFalseMultipleRulesPositiveNoMetaData() throws RbvException {
DbMetaData metaData = new DbMetaData();
metaData.putProperty("table.column", 3);
AndRuleOperation andRule = new AndRuleOperation();
andRule.addRule(ruleTest1ExpectFalse);
andRule.addRule(ruleTest2ExpectFalse);
assertTrue(andRule.isMatch(metaData));
}
use of com.axway.ats.rbv.db.DbMetaData in project ats-framework by Axway.
the class Test_DbNumericFieldRule method isMatchExpectedTruePositive.
@Test
public void isMatchExpectedTruePositive() throws RbvException {
DbMetaData metaData = new DbMetaData();
metaData.putProperty("table.column", 2);
assertTrue(ruleTest1ExpectTrue.isMatch(metaData));
}
Aggregations