File tree 1 file changed +27
-0
lines changed
src/test/java/org/springframework/data/spel
1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 21
21
import reactor .test .StepVerifier ;
22
22
23
23
import java .util .Arrays ;
24
+ import java .util .Collections ;
24
25
import java .util .concurrent .atomic .AtomicInteger ;
25
26
26
27
import org .junit .jupiter .api .BeforeEach ;
@@ -65,6 +66,32 @@ void shouldResolveExtension() {
65
66
assertThat (SecurityExpressionRoot .creationCounter ).hasValue (1 );
66
67
}
67
68
69
+ @ Test // GH-2392
70
+ void shouldFilterImperativeExtensionCorrectly () {
71
+
72
+ Expression expression = PARSER .parseExpression ("unknownMethod('FOO')" );
73
+ ExpressionDependencies dependencies = ExpressionDependencies .discover (expression );
74
+
75
+ ReactiveExtensionAwareEvaluationContextProvider provider = new ReactiveExtensionAwareEvaluationContextProvider (
76
+ Collections .singletonList (ExpressiveExtension .INSTANCE ));
77
+
78
+ provider .getEvaluationContextLater (new Object [0 ], dependencies ).as (StepVerifier ::create ) //
79
+ .expectNextCount (1 ).verifyComplete ();
80
+ }
81
+
82
+ @ Test // GH-2392
83
+ void shouldFilterReactiveExtensionCorrectly () {
84
+
85
+ Expression expression = PARSER .parseExpression ("unknownMethod('FOO')" );
86
+ ExpressionDependencies dependencies = ExpressionDependencies .discover (expression );
87
+
88
+ ReactiveExtensionAwareEvaluationContextProvider provider = new ReactiveExtensionAwareEvaluationContextProvider (
89
+ Collections .singletonList (SampleReactiveExtension .INSTANCE ));
90
+
91
+ provider .getEvaluationContextLater (new Object [0 ], dependencies ).as (StepVerifier ::create ) //
92
+ .expectNextCount (1 ).verifyComplete ();
93
+ }
94
+
68
95
@ Test // DATACMNS-1108
69
96
void shouldLoadGenericExtensionOnly () {
70
97
You can’t perform that action at this time.
0 commit comments