use of com.axway.ats.rbv.imap.rules.HeaderRule in project ats-framework by Axway.
the class Test_HeaderRule method isMatchModeFindSecondMimePartNegative.
@Test
public void isMatchModeFindSecondMimePartNegative() throws RbvException {
HeaderRule rule = new HeaderRule("Content-Type", "asdf", 1, 0, HeaderMatchMode.FIND, "isMatchModeFindSecondMimePartNegative", true);
assertFalse(rule.isMatch(metaData));
}
use of com.axway.ats.rbv.imap.rules.HeaderRule in project ats-framework by Axway.
the class Test_HeaderRule method isMatchModeRightSecondMimePartPositive.
@Test
public void isMatchModeRightSecondMimePartPositive() throws RbvException {
HeaderRule rule = new HeaderRule("Content-Type", "charset=WINDOWS-1252", 1, 0, HeaderMatchMode.RIGHT, "isMatchModeRightSecondMimePartPositive", true);
assertTrue(rule.isMatch(metaData));
}
use of com.axway.ats.rbv.imap.rules.HeaderRule in project ats-framework by Axway.
the class Test_HeaderRule method isMatchModeEqualsPositive.
@Test
public void isMatchModeEqualsPositive() throws RbvException {
HeaderRule rule = new HeaderRule("Sender", "infos1.mercatoloterie@gmail.com", HeaderMatchMode.EQUALS, "isMatchModeEqualsPositive", true);
assertTrue(rule.isMatch(metaData));
}
use of com.axway.ats.rbv.imap.rules.HeaderRule in project ats-framework by Axway.
the class Test_HeaderRule method isMatchWrongMetaData.
@Test(expected = MetaDataIncorrectException.class)
public void isMatchWrongMetaData() throws RbvException {
HeaderRule rule = new HeaderRule("Sender", "infos1.mercatoloterie@gmail.com", HeaderMatchMode.FIND, "isMatchEmptyMetaData", true);
metaData = new MetaData();
assertFalse(rule.isMatch(metaData));
}
use of com.axway.ats.rbv.imap.rules.HeaderRule 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));
}
Aggregations