How can I handle equalsIgnoreCase?
The following can only handle isEqualTo, would it be possible to do this without making anything inside a processor?
@Test
public void testPreicateProperties() throws Exception {
context.addRoutes(new RouteBuilder() {
@Override
public void configure() throws Exception {
from("direct:a")
.setProperty("A", constant("ab"))
.setProperty("B", constant("aB"))
.setHeader("A", constant("ab"))
.setHeader("B", constant("aB"))
.choice()
.when(PredicateBuilder.and(exchangeProperty("A").isEqualTo(exchangeProperty("B"))))
.log("Equal properties")
.otherwise()
.log("Not Equal properties")
.endChoice()
.choice()
.when(PredicateBuilder.and(header("A").isEqualTo(header("B"))))
.log("Equal headers")
.otherwise()
.log("Not Equal headers")
;
}
});
template.sendBody("direct:a", "body");
Thread.sleep(1500);
}
There is no such support currently. But there is a similar ticket to add that.
That ticket will add equalsIgnoreCase support in the simple language and also for the value builder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With