use of com.axway.ats.rbv.db.DbMetaData in project ats-framework by Axway.
the class Test_DbNumericFieldRule method isMatchExpectedTrueNegative.
@Test
public void isMatchExpectedTrueNegative() throws RbvException {
DbMetaData metaData = new DbMetaData();
metaData.putProperty("table.column", 22);
assertFalse(ruleTest1ExpectTrue.isMatch(metaData));
}
use of com.axway.ats.rbv.db.DbMetaData in project ats-framework by Axway.
the class Test_DbNumericFieldRule method isMatchExpectedTrueWrongNumericType.
@Test
public void isMatchExpectedTrueWrongNumericType() throws RbvException {
DbMetaData metaData = new DbMetaData();
metaData.putProperty("table.column", (long) 2);
assertFalse(ruleTest1ExpectTrue.isMatch(metaData));
}
use of com.axway.ats.rbv.db.DbMetaData in project ats-framework by Axway.
the class Test_DbBinaryFieldRule method isMatchExpectedTrueMultipleRulesNegativeDontMatch.
@Test
public void isMatchExpectedTrueMultipleRulesNegativeDontMatch() throws RbvException {
DbMetaData metaData = new DbMetaData();
metaData.putProperty("table.column", new byte[] { 0, 2 });
metaData.putProperty("table.column2", new byte[] { 0, 6 });
AndRuleOperation andRule = new AndRuleOperation();
andRule.addRule(ruleTest1ExpectTrue);
andRule.addRule(ruleTest2ExpectTrue);
assertFalse(andRule.isMatch(metaData));
}
use of com.axway.ats.rbv.db.DbMetaData in project ats-framework by Axway.
the class Test_DbMetaData method putGetProperty.
@Test
public void putGetProperty() throws RbvException {
DbMetaData metaData = new DbMetaData();
metaData.putProperty(new DbMetaDataKey("", "column"), "test_value");
assertEquals("test_value", metaData.getProperty(new DbMetaDataKey("column")));
}
use of com.axway.ats.rbv.db.DbMetaData in project ats-framework by Axway.
the class Test_DbBinaryFieldRule method isMatchExpectedTrueMultipleRulesNegativeNoMetaData.
@Test(expected = NoSuchMetaDataKeyException.class)
public void isMatchExpectedTrueMultipleRulesNegativeNoMetaData() throws RbvException {
DbMetaData metaData = new DbMetaData();
metaData.putProperty("test1", new byte[] { 0, 3 });
AndRuleOperation andRule = new AndRuleOperation();
andRule.addRule(ruleTest1ExpectTrue);
andRule.addRule(ruleTest2ExpectTrue);
assertFalse(andRule.isMatch(metaData));
}
Aggregations