use of com.axway.ats.rbv.rules.OrRuleOperation in project ats-framework by Axway.
the class Test_OrRuleOperation method isMatchOneOfThRulesExpectedFalse.
@Test
public void isMatchOneOfThRulesExpectedFalse() throws RbvException {
HeaderRule firstRule = new HeaderRule("Sender", "gmail.com", HeaderMatchMode.FIND, "isMatchOneOfThRulesExpectedFalse1", true);
HeaderRule secondRule = new HeaderRule("Sender", "gmail123.com", HeaderMatchMode.FIND, "isMatchOneOfThRulesExpectedFalse2", false);
OrRuleOperation andRule = new OrRuleOperation();
andRule.addRule(firstRule);
andRule.addRule(secondRule);
assertTrue(andRule.isMatch(metaData));
}
use of com.axway.ats.rbv.rules.OrRuleOperation in project ats-framework by Axway.
the class Test_OrRuleOperation method isMatchBothRulesExpectedTrue.
@Test
public void isMatchBothRulesExpectedTrue() throws RbvException {
HeaderRule firstRule = new HeaderRule("Sender", "gmail.com", HeaderMatchMode.FIND, "isMatchBothRulesExpectedTrue1", true);
HeaderRule secondRule = new HeaderRule("Sender", "gmail.com", HeaderMatchMode.FIND, "isMatchBothRulesExpectedTrue2", true);
OrRuleOperation andRule = new OrRuleOperation();
andRule.addRule(firstRule);
andRule.addRule(secondRule);
assertTrue(andRule.isMatch(metaData));
}
use of com.axway.ats.rbv.rules.OrRuleOperation 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.rules.OrRuleOperation 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));
}
Aggregations