use of com.axway.ats.rbv.imap.rules.HeaderRule in project ats-framework by Axway.
the class Test_HeaderRule method isMatchModeRegexPositive.
@Test
public void isMatchModeRegexPositive() throws RbvException {
HeaderRule rule = new HeaderRule("Sender", ".*@gmail.com", HeaderMatchMode.REGEX, "isMatchModeRegexPositive", 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 isMatchEmptyMetaData.
@Test(expected = MetaDataIncorrectException.class)
public void isMatchEmptyMetaData() throws RbvException {
HeaderRule rule = new HeaderRule("Sender", "infos1.mercatoloterie@gmail.com", HeaderMatchMode.FIND, "isMatchEmptyMetaData", true);
metaData = new ImapMetaData(null);
assertFalse(rule.isMatch(metaData));
}
use of com.axway.ats.rbv.imap.rules.HeaderRule in project ats-framework by Axway.
the class Test_HeaderRule method isMatchModeRightThirdHeaderNegative.
@Test
public void isMatchModeRightThirdHeaderNegative() throws RbvException {
HeaderRule rule = new HeaderRule("Content-Type", "text", 1, 0, HeaderMatchMode.RIGHT, "isMatchModeRightThirdHeaderNegative", 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 isMatchModeFindSecondMimePartPositive.
@Test
public void isMatchModeFindSecondMimePartPositive() throws RbvException {
HeaderRule rule = new HeaderRule("Content-Type", "WINDOWS-1252", 1, 0, HeaderMatchMode.FIND, "isMatchModeFindSecondMimePartPositive", true);
//the whole string
assertTrue(rule.isMatch(metaData));
}
use of com.axway.ats.rbv.imap.rules.HeaderRule in project ats-framework by Axway.
the class Test_HeaderRule method isMatchModeEqualsNegative.
@Test
public void isMatchModeEqualsNegative() throws RbvException {
HeaderRule rule = new HeaderRule("Sender", "infos1.mercatoloterie@gmail.co", HeaderMatchMode.EQUALS, "isMatchModeEqualsNegative", true);
assertFalse(rule.isMatch(metaData));
}
Aggregations