Search in sources :

Example 11 with SubjectRule

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

the class Test_SubjectRule method isMatchModeRightPositive.

@Test
public void isMatchModeRightPositive() throws RbvException {
    SubjectRule rule = new SubjectRule("MONDIALE.", SubjectMatchMode.RIGHT, "isMatchModeRightPositive", true);
    assertTrue(rule.isMatch(metaData));
}
Also used : SubjectRule(com.axway.ats.rbv.imap.rules.SubjectRule) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Example 12 with SubjectRule

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

the class Test_SubjectRule method isMatchModeLeftNegative.

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

Example 13 with SubjectRule

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

the class Test_SubjectRule method isMatchWrongMetaData.

@Test(expected = MetaDataIncorrectException.class)
public void isMatchWrongMetaData() throws RbvException {
    SubjectRule rule = new SubjectRule("infos1.mercatoloterie@gmail.com", SubjectMatchMode.FIND, "isMatchEmptyMetaData", true);
    metaData = new MetaData();
    assertFalse(rule.isMatch(metaData));
}
Also used : ImapMetaData(com.axway.ats.rbv.imap.ImapMetaData) MetaData(com.axway.ats.rbv.MetaData) SubjectRule(com.axway.ats.rbv.imap.rules.SubjectRule) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Example 14 with SubjectRule

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

the class Test_SubjectRule method isMatchModeEqualsPositive.

@Test
public void isMatchModeEqualsPositive() throws RbvException {
    SubjectRule rule = new SubjectRule("LOTERIE MONDIALE.", SubjectMatchMode.EQUALS, "isMatchModeEqualsPositive", true);
    assertTrue(rule.isMatch(metaData));
}
Also used : SubjectRule(com.axway.ats.rbv.imap.rules.SubjectRule) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Example 15 with SubjectRule

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

the class Test_SubjectRule method isMatchModeRegexNegative.

@Test
public void isMatchModeRegexNegative() throws RbvException {
    SubjectRule rule = new SubjectRule("LOTERIE MONDIALE..+", SubjectMatchMode.REGEX, "isMatchModeRegexNegative", true);
    assertFalse(rule.isMatch(metaData));
}
Also used : SubjectRule(com.axway.ats.rbv.imap.rules.SubjectRule) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Aggregations

SubjectRule (com.axway.ats.rbv.imap.rules.SubjectRule)15 BaseTest (com.axway.ats.rbv.BaseTest)13 Test (org.junit.Test)13 PublicAtsApi (com.axway.ats.common.PublicAtsApi)2 ImapMetaData (com.axway.ats.rbv.imap.ImapMetaData)2 MetaData (com.axway.ats.rbv.MetaData)1