From d0f7083699da7825b27d2c96487a330d99645f0a Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 3 Jun 2020 15:36:07 +0200 Subject: add jUnit test for EAAF process-engine --- .../process/spring/test/SpringExpressionEvaluatorTest.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl') diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/spring/test/SpringExpressionEvaluatorTest.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/spring/test/SpringExpressionEvaluatorTest.java index 4aa32360..01fc6bb8 100644 --- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/spring/test/SpringExpressionEvaluatorTest.java +++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/spring/test/SpringExpressionEvaluatorTest.java @@ -59,8 +59,17 @@ public class SpringExpressionEvaluatorTest { @Test public void testEvaluateExpressionWithCtx() { - ctx.put("myProperty", false); + ctx.put("myProperty", false); + ctx.put("stringProperty", "aabbccddee"); + + //check basic boolean flags assertFalse(expressionEvaluator.evaluate(ctx, "ctx['myProperty']")); + + //check String flags + assertTrue(expressionEvaluator.evaluate(ctx, "'aabbccddee'.equals(ctx['stringProperty'])")); + assertFalse(expressionEvaluator.evaluate(ctx, "'aabbccddee'.equals(ctx['notExist'])")); + assertFalse(expressionEvaluator.evaluate(ctx, "'aabbccddee'.equals(ctx['myProperty'])")); + } @Test -- cgit v1.2.3