use of com.axway.ats.rbv.imap.rules.HeaderRule in project ats-framework by Axway.
the class Test_HeaderRule method isMatchModeLeftThirdHeaderPositive.
@Test
public void isMatchModeLeftThirdHeaderPositive() throws RbvException {
HeaderRule rule = new HeaderRule("Received", "(qmail 20592", 2, HeaderMatchMode.LEFT, "isMatchModeLeftThirdHeaderPositive", 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 isMatchHeaderValueAtAnyPositionNegative.
@Test
public void isMatchHeaderValueAtAnyPositionNegative() throws RbvException, PackageException, FileNotFoundException {
HeaderRule rule = new HeaderRule("Test-Header", "some value4", HeaderMatchMode.EQUALS, "isMatchHeaderValueAtAnyPositionNegative", 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 isMatchModeFindThirdHeaderPositive.
@Test
public void isMatchModeFindThirdHeaderPositive() throws RbvException {
HeaderRule rule = new HeaderRule("Received", "invoked from network", 2, HeaderMatchMode.FIND, "isMatchModeFindThirdHeaderPositive", 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 isMatchModeRegexSecondMimePartNegative.
@Test
public void isMatchModeRegexSecondMimePartNegative() throws RbvException {
HeaderRule rule = new HeaderRule("Content-Type", "asdf.*", 1, 0, HeaderMatchMode.REGEX, "isMatchModeRegexSecondMimePartNegative", 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 isMatchModeLeftSecondMimePartNegative.
@Test
public void isMatchModeLeftSecondMimePartNegative() throws RbvException {
HeaderRule rule = new HeaderRule("Content-Type", "asdf", 1, 0, HeaderMatchMode.LEFT, "isMatchModeLeftSecondMimePartNegative", true);
assertFalse(rule.isMatch(metaData));
}
Aggregations