use of com.axway.ats.rbv.imap.rules.HeaderRule in project ats-framework by Axway.
the class Test_HeaderRule method isMatchModeRegexThirdHeaderPositive.
@Test
public void isMatchModeRegexThirdHeaderPositive() throws RbvException {
HeaderRule rule = new HeaderRule("Received", ".qmail 20592.*", 2, HeaderMatchMode.REGEX, "isMatchModeRegexThirdHeaderPositive", 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 isMatchPartHeaderValueAtAnyPosition.
@Test
public void isMatchPartHeaderValueAtAnyPosition() throws RbvException, PackageException, FileNotFoundException {
HeaderRule rule;
rule = new HeaderRule("Test-Part-Header", "some part value1", 0, -1, HeaderMatchMode.EQUALS, "isMatchPartHeaderValueAtAnyPosition", true);
assertTrue(rule.isMatch(metaData));
rule = new HeaderRule("Test-Part-Header", "some part value2", 0, -1, HeaderMatchMode.EQUALS, "isMatchPartHeaderValueAtAnyPosition", true);
assertTrue(rule.isMatch(metaData));
rule = new HeaderRule("Test-Part-Header", "some part value3", 0, -1, HeaderMatchMode.EQUALS, "isMatchPartHeaderValueAtAnyPosition", 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 isMatchModeLeftSecondMimePartPositive.
@Test
public void isMatchModeLeftSecondMimePartPositive() throws RbvException {
HeaderRule rule = new HeaderRule("Content-Type", "text/html", 1, 0, HeaderMatchMode.LEFT, "isMatchModeLeftSecondMimePartPositive", 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 isMatchModeRightSecondMimePartNegative.
@Test
public void isMatchModeRightSecondMimePartNegative() throws RbvException {
HeaderRule rule = new HeaderRule("Content-Type", "text", 1, 0, HeaderMatchMode.RIGHT, "isMatchModeRightSecondMimePartNegative", 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 isMatchPartHeaderValueAtAnyPositionNegative.
@Test
public void isMatchPartHeaderValueAtAnyPositionNegative() throws RbvException, PackageException, FileNotFoundException {
HeaderRule rule = new HeaderRule("Test-Part-Header", "some part value4", 0, -1, HeaderMatchMode.EQUALS, "isMatchPartHeaderValueAtAnyPositionNegative", true);
assertFalse(rule.isMatch(metaData));
}
Aggregations