You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2019/11/26 10:42:58 UTC

[camel-k-runtime] 02/18: YAML: improve filter dsl test

This is an automated email from the ASF dual-hosted git repository.

lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k-runtime.git

commit 52fec199a5604cd3a792ab20740f9c06b16c1bf5
Author: lburgazzoli <lb...@gmail.com>
AuthorDate: Sun Nov 24 21:31:35 2019 +0100

    YAML: improve filter dsl test
---
 .../camel/k/loader/yaml/parser/FilterTest.groovy       | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/camel-k-loader-yaml/src/test/groovy/org/apache/camel/k/loader/yaml/parser/FilterTest.groovy b/camel-k-loader-yaml/src/test/groovy/org/apache/camel/k/loader/yaml/parser/FilterTest.groovy
index 9249a3b..6e78d63 100644
--- a/camel-k-loader-yaml/src/test/groovy/org/apache/camel/k/loader/yaml/parser/FilterTest.groovy
+++ b/camel-k-loader-yaml/src/test/groovy/org/apache/camel/k/loader/yaml/parser/FilterTest.groovy
@@ -29,10 +29,12 @@ class FilterTest extends TestSupport {
         when:
             def processor = new FilterStepParser().toProcessor(stepContext)
         then:
-            def p = processor as FilterDefinition
-
-            p.expression.language == 'simple'
-            p.expression.expression == '${body}'
+            with (processor, FilterDefinition) {
+                with (expression) {
+                    language == 'simple'
+                    expression == '${body}'
+                }
+            }
     }
 
     def "definition with expression block"() {
@@ -44,9 +46,11 @@ class FilterTest extends TestSupport {
         when:
             def processor = new FilterStepParser().toProcessor(stepContext)
         then:
-            with(processor, FilterDefinition) {
-                expression.language == 'simple'
-                expression.expression == '${body}'
+            with (processor, FilterDefinition) {
+                with (expression) {
+                    language == 'simple'
+                    expression == '${body}'
+                }
             }
     }