use of com.axway.ats.rbv.imap.rules.MimePartRule in project ats-framework by Axway.
the class Test_MimePartRule method isMatchNullMetaData.
@Test(expected = RbvException.class)
public void isMatchNullMetaData() throws RbvException {
MimePartRule rule = new MimePartRule(expectedMailMessage, 0, false, "isMatchNullMetaData", true);
assertFalse(rule.isMatch(null));
}
use of com.axway.ats.rbv.imap.rules.MimePartRule in project ats-framework by Axway.
the class Test_MimePartRule method isMatchRegularPartNegative.
@Test
public void isMatchRegularPartNegative() throws RbvException {
//expected true
MimePartRule rule = new MimePartRule(expectedMailMessage, 2, false, "isMatchRegularPartNegative1", true);
assertFalse(rule.isMatch(metaData));
//expected false
rule = new MimePartRule(expectedMailMessage, 0, false, "isMatchRegularPartNegative2", false);
assertFalse(rule.isMatch(metaData));
}
use of com.axway.ats.rbv.imap.rules.MimePartRule in project ats-framework by Axway.
the class Test_MimePartRule method isMatchAttachmentNegative.
@Test
public void isMatchAttachmentNegative() throws RbvException {
//expected true
MimePartRule rule = new MimePartRule(expectedMailMessage, 1, true, "isMatchAttachmentNegative1", true);
assertFalse(rule.isMatch(metaData));
//expected false
rule = new MimePartRule(expectedMailMessage, 0, true, "isMatchAttachmentNegative2", false);
assertFalse(rule.isMatch(metaData));
}
use of com.axway.ats.rbv.imap.rules.MimePartRule in project ats-framework by Axway.
the class Test_MimePartRule method isMatchAttachmentNoSuchPart.
@Test
public void isMatchAttachmentNoSuchPart() throws PackageException, RbvException {
mailMessage = new MimePackage(Test_MimePartRule.class.getResourceAsStream("mail_with_one_attachment.msg"));
metaData = new ImapMetaData(mailMessage);
//expected true
MimePartRule rule = new MimePartRule(expectedMailMessage, 1, true, "isMatchAttachmentNoSuchPart1", true);
assertFalse(rule.isMatch(metaData));
//expected false
rule = new MimePartRule(expectedMailMessage, 1, true, "isMatchAttachmentNoSuchPart2", false);
assertTrue(rule.isMatch(metaData));
}
Aggregations