Search in sources :

Example 1 with OrRuleOperation

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

the class Test_OrRuleOperation method isMatchOneOfThRulesExpectedFalse.

@Test
public void isMatchOneOfThRulesExpectedFalse() throws RbvException {
    HeaderRule firstRule = new HeaderRule("Sender", "gmail.com", HeaderMatchMode.FIND, "isMatchOneOfThRulesExpectedFalse1", true);
    HeaderRule secondRule = new HeaderRule("Sender", "gmail123.com", HeaderMatchMode.FIND, "isMatchOneOfThRulesExpectedFalse2", false);
    OrRuleOperation andRule = new OrRuleOperation();
    andRule.addRule(firstRule);
    andRule.addRule(secondRule);
    assertTrue(andRule.isMatch(metaData));
}
Also used : HeaderRule(com.axway.ats.rbv.imap.rules.HeaderRule) OrRuleOperation(com.axway.ats.rbv.rules.OrRuleOperation) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Example 2 with OrRuleOperation

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

the class Test_OrRuleOperation method isMatchBothRulesExpectedTrue.

@Test
public void isMatchBothRulesExpectedTrue() throws RbvException {
    HeaderRule firstRule = new HeaderRule("Sender", "gmail.com", HeaderMatchMode.FIND, "isMatchBothRulesExpectedTrue1", true);
    HeaderRule secondRule = new HeaderRule("Sender", "gmail.com", HeaderMatchMode.FIND, "isMatchBothRulesExpectedTrue2", true);
    OrRuleOperation andRule = new OrRuleOperation();
    andRule.addRule(firstRule);
    andRule.addRule(secondRule);
    assertTrue(andRule.isMatch(metaData));
}
Also used : HeaderRule(com.axway.ats.rbv.imap.rules.HeaderRule) OrRuleOperation(com.axway.ats.rbv.rules.OrRuleOperation) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Example 3 with OrRuleOperation

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

the class Test_OrRuleOperation method isMatchNoneOfTheRulesPasses.

@Test
public void isMatchNoneOfTheRulesPasses() throws RbvException {
    HeaderRule firstRule = new HeaderRule("Sender", "gmail.com", HeaderMatchMode.FIND, "isMatchNoneOfTheRulesPasses1", false);
    HeaderRule secondRule = new HeaderRule("Sender", "gmail123.com", HeaderMatchMode.FIND, "isMatchNoneOfTheRulesPasses2", true);
    OrRuleOperation andRule = new OrRuleOperation();
    andRule.addRule(firstRule);
    andRule.addRule(secondRule);
    assertFalse(andRule.isMatch(metaData));
}
Also used : HeaderRule(com.axway.ats.rbv.imap.rules.HeaderRule) OrRuleOperation(com.axway.ats.rbv.rules.OrRuleOperation) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Example 4 with OrRuleOperation

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

the class Test_OrRuleOperation method isMatchOnlyOneRulePasses.

@Test
public void isMatchOnlyOneRulePasses() throws RbvException {
    HeaderRule firstRule = new HeaderRule("Sender", "gmail.com", HeaderMatchMode.FIND, "isMatchOnlyOneRulePasses1", true);
    HeaderRule secondRule = new HeaderRule("Sender", "gmail123.com", HeaderMatchMode.FIND, "isMatchOnlyOneRulePasses2", true);
    OrRuleOperation andRule = new OrRuleOperation();
    andRule.addRule(firstRule);
    andRule.addRule(secondRule);
    assertTrue(andRule.isMatch(metaData));
}
Also used : HeaderRule(com.axway.ats.rbv.imap.rules.HeaderRule) OrRuleOperation(com.axway.ats.rbv.rules.OrRuleOperation) BaseTest(com.axway.ats.rbv.BaseTest) Test(org.junit.Test)

Aggregations

BaseTest (com.axway.ats.rbv.BaseTest)4 HeaderRule (com.axway.ats.rbv.imap.rules.HeaderRule)4 OrRuleOperation (com.axway.ats.rbv.rules.OrRuleOperation)4 Test (org.junit.Test)4