use of com.axway.ats.rbv.imap.rules.HeaderRule in project ats-framework by Axway.
the class Test_HeaderRule method isMatchModeRegexSecondMimePartPositive.
@Test
public void isMatchModeRegexSecondMimePartPositive() throws RbvException {
HeaderRule rule = new HeaderRule("Content-Type", "text.*", 1, 0, HeaderMatchMode.REGEX, "isMatchModeRegexSecondMimePartPositive", 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 isMatchModeFindThirdHeaderNegative.
@Test
public void isMatchModeFindThirdHeaderNegative() throws RbvException {
HeaderRule rule = new HeaderRule("Content-Type", "asdf", 1, 0, HeaderMatchMode.FIND, "isMatchModeFindThirdHeaderNegative", 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 isMatchModeFindPositive.
@Test
public void isMatchModeFindPositive() throws RbvException {
HeaderRule rule = new HeaderRule("Sender", "infos1.mercatoloterie@gmail.com", HeaderMatchMode.FIND, "isMatchModeFindPositive", true);
//the whole string
assertTrue(rule.isMatch(metaData));
//part of the string
rule.setExpectedValue("gmail.com");
assertTrue(rule.isMatch(metaData));
}
use of com.axway.ats.rbv.imap.rules.HeaderRule in project ats-framework by Axway.
the class Test_HeaderRule method isMatchNoSuchHeader.
@Test
public void isMatchNoSuchHeader() throws RbvException {
HeaderRule rule = new HeaderRule("Sender123", "infos1.mercatoloterie@gmail.com", HeaderMatchMode.FIND, "isMatchNoSuchHeader", 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 isMatchModeRegexNegative.
@Test
public void isMatchModeRegexNegative() throws RbvException {
HeaderRule rule = new HeaderRule("Sender", "infos1.mercatoloterie.?gmail.com.+", HeaderMatchMode.REGEX, "isMatchModeRegexNegative", true);
assertFalse(rule.isMatch(metaData));
}
Aggregations