use of com.adaptris.core.services.conditional.operator.IsNull in project interlok by adaptris.
the class DoWhileTest method retrieveObjectForSampleConfig.
@Override
protected Object retrieveObjectForSampleConfig() {
ConditionMetadata condition = new ConditionMetadata();
condition.setMetadataKey("key1");
condition.setOperator(new NotNull());
ConditionMetadata condition2 = new ConditionMetadata();
condition2.setMetadataKey("key2");
condition2.setOperator(new IsNull());
ConditionOr conditionOr = new ConditionOr();
conditionOr.getConditions().add(condition);
conditionOr.getConditions().add(condition2);
ThenService thenSrvc = new ThenService();
thenSrvc.setService(new LogMessageService());
doWhile.setCondition(conditionOr);
doWhile.setThen(thenSrvc);
DoWhile doWhile = new DoWhile();
doWhile.setCondition(conditionOr);
doWhile.setThen(thenSrvc);
return doWhile;
}
use of com.adaptris.core.services.conditional.operator.IsNull in project interlok by adaptris.
the class WhileTest method retrieveObjectForSampleConfig.
@Override
protected Object retrieveObjectForSampleConfig() {
ConditionMetadata condition = new ConditionMetadata();
condition.setMetadataKey("key1");
condition.setOperator(new NotNull());
ConditionMetadata condition2 = new ConditionMetadata();
condition2.setMetadataKey("key2");
condition2.setOperator(new IsNull());
ConditionOr conditionOr = new ConditionOr();
conditionOr.getConditions().add(condition);
conditionOr.getConditions().add(condition2);
ThenService thenSrvc = new ThenService();
thenSrvc.setService(new LogMessageService());
logicalExpression.setCondition(conditionOr);
logicalExpression.setThen(thenSrvc);
// We init and start the service in the setup, lets stop it.
try {
StopMe(logicalExpression);
} catch (Exception e) {
}
return logicalExpression;
}
use of com.adaptris.core.services.conditional.operator.IsNull in project interlok by adaptris.
the class ConditionMetadataTest method testMetadataDoesNotExist.
@Test
public void testMetadataDoesNotExist() throws Exception {
condition.setMetadataKey("key1");
condition.setOperator(new IsNull());
assertTrue(condition.evaluate(message));
}
use of com.adaptris.core.services.conditional.operator.IsNull in project interlok by adaptris.
the class ConditionPayloadTest method testPayloadDoesNotExist.
@Test
public void testPayloadDoesNotExist() throws Exception {
condition.setOperator(new IsNull());
assertTrue(condition.evaluate(message));
}
use of com.adaptris.core.services.conditional.operator.IsNull in project interlok by adaptris.
the class IsNullTest method setUp.
@Before
public void setUp() throws Exception {
operator = new IsNull();
message = DefaultMessageFactory.getDefaultInstance().newMessage();
}
Aggregations