use of com.axway.ats.rbv.imap.ImapMetaData 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));
}
use of com.axway.ats.rbv.imap.ImapMetaData in project ats-framework by Axway.
the class Test_AttachmentNameRule method setUp.
@Before
public void setUp() throws PackageException, RbvException {
mailMessage = new MimePackage(Test_AttachmentNameRule.class.getResourceAsStream("mail_with_two_attachments.msg"));
metaData = new ImapMetaData(mailMessage);
}
use of com.axway.ats.rbv.imap.ImapMetaData in project ats-framework by Axway.
the class Test_MimePartCountRule method isMatchEmptyMetaData.
@Test(expected = MetaDataIncorrectException.class)
public void isMatchEmptyMetaData() throws RbvException {
MimePartCountRule rule = new MimePartCountRule(5, true, "isMatchEmptyMetaData", true);
metaData = new ImapMetaData(null);
assertFalse(rule.isMatch(metaData));
}
use of com.axway.ats.rbv.imap.ImapMetaData in project ats-framework by Axway.
the class Test_MimePartCountRule method setUp.
@Before
public void setUp() throws Exception {
MimePackage mailMessage = null;
mailMessage = new MimePackage(Test_MimePartCountRule.class.getResourceAsStream("mail_with_one_attachment.msg"));
metaData = new ImapMetaData(mailMessage);
}
use of com.axway.ats.rbv.imap.ImapMetaData in project ats-framework by Axway.
the class Test_HeaderRule method isMatchEmptyMetaData.
@Test(expected = MetaDataIncorrectException.class)
public void isMatchEmptyMetaData() throws RbvException {
HeaderRule rule = new HeaderRule("Sender", "infos1.mercatoloterie@gmail.com", HeaderMatchMode.FIND, "isMatchEmptyMetaData", true);
metaData = new ImapMetaData(null);
assertFalse(rule.isMatch(metaData));
}
Aggregations