use of com.axway.ats.rbv.imap.rules.HeaderRule in project ats-framework by Axway.
the class Test_HeaderRule method isMatchModeRegexThirdHeaderNegative.
@Test
public void isMatchModeRegexThirdHeaderNegative() throws RbvException {
HeaderRule rule = new HeaderRule("Content-Type", "asdf.*", 1, 0, HeaderMatchMode.REGEX, "isMatchModeRegexThirdHeaderNegative", 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 isMatchModeLeftThirdHeaderNegative.
@Test
public void isMatchModeLeftThirdHeaderNegative() throws RbvException {
HeaderRule rule = new HeaderRule("Content-Type", "asdf", 1, 0, HeaderMatchMode.LEFT, "isMatchModeLeftThirdHeaderNegative", 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 isMatchModeLeftNegative.
@Test
public void isMatchModeLeftNegative() throws RbvException {
HeaderRule rule = new HeaderRule("Sender", "gmail.com", HeaderMatchMode.LEFT, "isMatchModeLeftNegative", 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 isMatchModeLeftPositive.
@Test
public void isMatchModeLeftPositive() throws RbvException {
HeaderRule rule = new HeaderRule("Sender", "infos1.mercatoloterie", HeaderMatchMode.LEFT, "isMatchModeLeftPositive", 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 setExpectedValue.
@Test
public void setExpectedValue() throws RbvException {
HeaderRule rule = new HeaderRule("Sender", "", HeaderMatchMode.FIND, "setExpectedValue", true);
//positive
rule.setExpectedValue("infos1.mercatoloterie@gmail.com");
assertTrue(rule.isMatch(metaData));
//negative
rule.setExpectedValue("werqwer@gmail.com");
assertFalse(rule.isMatch(metaData));
}
Aggregations