File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
src/test/java/org/springframework/data/spel Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change 2121import reactor .test .StepVerifier ;
2222
2323import java .util .Arrays ;
24+ import java .util .Collections ;
2425import java .util .concurrent .atomic .AtomicInteger ;
2526
2627import org .junit .jupiter .api .BeforeEach ;
@@ -65,6 +66,32 @@ void shouldResolveExtension() {
6566 assertThat (SecurityExpressionRoot .creationCounter ).hasValue (1 );
6667 }
6768
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+
6895 @ Test // DATACMNS-1108
6996 void shouldLoadGenericExtensionOnly () {
7097
You can’t perform that action at this time.
0 commit comments