use of com.axway.ats.rbv.imap.rules.HeaderRule in project ats-framework by Axway.
the class Test_AndRuleOperation method isMatchOneOfThRulesExpectedFalsePositive.
@Test
public void isMatchOneOfThRulesExpectedFalsePositive() throws RbvException {
HeaderRule firstRule = new HeaderRule("Sender", "gmail.com", HeaderMatchMode.FIND, "isMatchOneOfThRulesExpectedFalsePositive", true);
HeaderRule secondRule = new HeaderRule("Sender", "gmail123.com", HeaderMatchMode.FIND, "isMatchOneOfThRulesExpectedFalsePositive", false);
AndRuleOperation andRule = new AndRuleOperation();
andRule.addRule(firstRule);
andRule.addRule(secondRule);
assertTrue(andRule.isMatch(metaData));
}
use of com.axway.ats.rbv.imap.rules.HeaderRule in project ats-framework by Axway.
the class Test_AndRuleOperation method isMatchOneOfThRulesExpectedFalseNegative.
@Test
public void isMatchOneOfThRulesExpectedFalseNegative() throws RbvException {
HeaderRule firstRule = new HeaderRule("Sender", "gmail.com", HeaderMatchMode.FIND, "isMatchOneOfThRulesExpectedFalseNegative", true);
HeaderRule secondRule = new HeaderRule("Sender", "gmail.com", HeaderMatchMode.FIND, "isMatchOneOfThRulesExpectedFalseNegative", false);
AndRuleOperation andRule = new AndRuleOperation();
andRule.addRule(firstRule);
andRule.addRule(secondRule);
assertFalse(andRule.isMatch(metaData));
}
use of com.axway.ats.rbv.imap.rules.HeaderRule in project ats-framework by Axway.
the class Test_OrRuleOperation method isMatchNoneOfTheRulesPasses.
@Test
public void isMatchNoneOfTheRulesPasses() throws RbvException {
HeaderRule firstRule = new HeaderRule("Sender", "gmail.com", HeaderMatchMode.FIND, "isMatchNoneOfTheRulesPasses1", false);
HeaderRule secondRule = new HeaderRule("Sender", "gmail123.com", HeaderMatchMode.FIND, "isMatchNoneOfTheRulesPasses2", true);
OrRuleOperation andRule = new OrRuleOperation();
andRule.addRule(firstRule);
andRule.addRule(secondRule);
assertFalse(andRule.isMatch(metaData));
}
use of com.axway.ats.rbv.imap.rules.HeaderRule in project ats-framework by Axway.
the class Test_OrRuleOperation method isMatchOnlyOneRulePasses.
@Test
public void isMatchOnlyOneRulePasses() throws RbvException {
HeaderRule firstRule = new HeaderRule("Sender", "gmail.com", HeaderMatchMode.FIND, "isMatchOnlyOneRulePasses1", true);
HeaderRule secondRule = new HeaderRule("Sender", "gmail123.com", HeaderMatchMode.FIND, "isMatchOnlyOneRulePasses2", true);
OrRuleOperation andRule = new OrRuleOperation();
andRule.addRule(firstRule);
andRule.addRule(secondRule);
assertTrue(andRule.isMatch(metaData));
}
use of com.axway.ats.rbv.imap.rules.HeaderRule in project ats-framework by Axway.
the class Test_HeaderRule method isMatchModeRightThirdHeaderPositive.
@Test
public void isMatchModeRightThirdHeaderPositive() throws RbvException {
HeaderRule rule = new HeaderRule("Received", "14:33:17 -0000", 2, HeaderMatchMode.RIGHT, "isMatchModeRightThirdHeaderPositive", true);
assertTrue(rule.isMatch(metaData));
}
Aggregations