Search in sources :

Example 6 with MimePartCountRule

use of com.axway.ats.rbv.imap.rules.MimePartCountRule 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));
}
Also used : ImapMetaData(com.axway.ats.rbv.imap.ImapMetaData) MimePartCountRule(com.axway.ats.rbv.imap.rules.MimePartCountRule) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Example 7 with MimePartCountRule

use of com.axway.ats.rbv.imap.rules.MimePartCountRule in project ats-framework by Axway.

the class Test_MimePartCountRule method matchAttachmentsCountNegative.

@Test
public void matchAttachmentsCountNegative() throws RbvException {
    MimePartCountRule rule = new MimePartCountRule(5, true, "matchAttachmentsCountNegative", true);
    assertFalse(rule.isMatch(metaData));
}
Also used : MimePartCountRule(com.axway.ats.rbv.imap.rules.MimePartCountRule) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Example 8 with MimePartCountRule

use of com.axway.ats.rbv.imap.rules.MimePartCountRule in project ats-framework by Axway.

the class Test_MimePartCountRule method isMatchNullMetaData.

@Test(expected = RbvException.class)
public void isMatchNullMetaData() throws RbvException {
    MimePartCountRule rule = new MimePartCountRule(5, true, "isMatchNullMetaData", true);
    assertFalse(rule.isMatch(null));
}
Also used : MimePartCountRule(com.axway.ats.rbv.imap.rules.MimePartCountRule) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Aggregations

MimePartCountRule (com.axway.ats.rbv.imap.rules.MimePartCountRule)8 BaseTest (com.axway.ats.rbv.BaseTest)7 Test (org.junit.Test)7 ImapMetaData (com.axway.ats.rbv.imap.ImapMetaData)2 PublicAtsApi (com.axway.ats.common.PublicAtsApi)1 MetaData (com.axway.ats.rbv.MetaData)1