use of com.axway.ats.rbv.db.rules.DbDateFieldRule in project ats-framework by Axway.
the class Test_DbDateFieldRule method isMatchDatePositiveBefore.
@Test
public void isMatchDatePositiveBefore() throws RbvException {
DbDateFieldRule rule = new DbDateFieldRule("test", tomorrow, MatchRelation.BEFORE_DATE, "isMatchWrongActualDateFormat", true);
testMetaData.putProperty("test", new Timestamp(today.getTime()));
assertTrue(rule.isMatch(testMetaData));
}
use of com.axway.ats.rbv.db.rules.DbDateFieldRule in project ats-framework by Axway.
the class Test_DbDateFieldRule method isMatchNullExpectedValueNegative.
@Test
public void isMatchNullExpectedValueNegative() throws RbvException {
testMetaData.putProperty("test", "1191941800");
DbDateFieldRule rule = new DbDateFieldRule("test", null, MatchRelation.AFTER_DATE, "yyyy-MM-dd HH:mm:ss", "isMatchNullActualValue", true);
assertFalse(rule.isMatch(testMetaData));
}
use of com.axway.ats.rbv.db.rules.DbDateFieldRule in project ats-framework by Axway.
the class Test_DbDateFieldRule method isMatchRelationExactDatePositive.
@Test
public void isMatchRelationExactDatePositive() throws RbvException {
testMetaData.putProperty("test", "2007-10-09 15:00:00");
DbDateFieldRule rule = new DbDateFieldRule("test", "1191942000", MatchRelation.EXACT, "yyyy-MM-dd HH:mm:ss", "isMatchRelationExactDatePositive", true);
assertTrue(rule.isMatch(testMetaData));
}
use of com.axway.ats.rbv.db.rules.DbDateFieldRule in project ats-framework by Axway.
the class Test_DbDateFieldRule method isMatchNullActualValuePositive.
@Test
public void isMatchNullActualValuePositive() throws RbvException {
testMetaData.putProperty("test", null);
DbDateFieldRule rule = new DbDateFieldRule("test", null, MatchRelation.AFTER_DATE, "yyyy-MM-dd HH:mm:ss", "isMatchNullActualValue", true);
assertTrue(rule.isMatch(testMetaData));
}
use of com.axway.ats.rbv.db.rules.DbDateFieldRule in project ats-framework by Axway.
the class Test_DbDateFieldRule method isMatchNullActualValueNegative.
@Test
public void isMatchNullActualValueNegative() throws RbvException {
testMetaData.putProperty("test", null);
DbDateFieldRule rule = new DbDateFieldRule("test", "1191941800", MatchRelation.AFTER_DATE, "yyyy-MM-dd HH:mm:ss", "isMatchNullActualValue", true);
assertFalse(rule.isMatch(testMetaData));
}
Aggregations