use of com.axway.ats.rbv.imap.rules.SubjectRule in project ats-framework by Axway.
the class Test_SubjectRule method isMatchNullMetaData.
@Test(expected = RbvException.class)
public void isMatchNullMetaData() throws RbvException {
SubjectRule rule = new SubjectRule("infos1.mercatoloterie@gmail.com", SubjectMatchMode.FIND, "isMatchNullMetaData", true);
assertFalse(rule.isMatch(null));
}
use of com.axway.ats.rbv.imap.rules.SubjectRule in project ats-framework by Axway.
the class Test_SubjectRule method isMatchEmptyMetaData.
@Test(expected = MetaDataIncorrectException.class)
public void isMatchEmptyMetaData() throws RbvException {
SubjectRule rule = new SubjectRule("infos1.mercatoloterie@gmail.com", SubjectMatchMode.FIND, "isMatchEmptyMetaData", true);
metaData = new ImapMetaData(null);
assertFalse(rule.isMatch(metaData));
}
use of com.axway.ats.rbv.imap.rules.SubjectRule in project ats-framework by Axway.
the class Test_SubjectRule method isMatchModeEqualsNegative.
@Test
public void isMatchModeEqualsNegative() throws RbvException {
SubjectRule rule = new SubjectRule("MONDIALE.", SubjectMatchMode.EQUALS, "isMatchModeEqualsNegative", true);
assertFalse(rule.isMatch(metaData));
}
use of com.axway.ats.rbv.imap.rules.SubjectRule in project ats-framework by Axway.
the class Test_SubjectRule method isMatchModeRightNegative.
@Test
public void isMatchModeRightNegative() throws RbvException {
SubjectRule rule = new SubjectRule("MONDIALE", SubjectMatchMode.RIGHT, "isMatchModeRightNegative", true);
assertFalse(rule.isMatch(metaData));
}
use of com.axway.ats.rbv.imap.rules.SubjectRule in project ats-framework by Axway.
the class ImapVerification method checkSubject.
/**
* Check that the subject of the nested message has the specified string
*
* @param subject the expected subject
* @param nestedPackagePath path to the nested message
*/
@PublicAtsApi
public void checkSubject(String subject, int... nestedPackagePath) {
//create the rule
SubjectRule subjectRule = new SubjectRule(nestedPackagePath, subject, SubjectMatchMode.EQUALS, "checkSubject" + getNestedMimePackagePathDescription(nestedPackagePath), true);
rootRule.addRule(subjectRule);
}
Aggregations