@@ -269,7 +269,7 @@ public void bindQuotedMulitParameterInArray() {
269
269
}
270
270
271
271
@ Test // DATAMONGO-2545
272
- void shouldABindArgumentsViaIndexInSpelExpressions () {
272
+ public void shouldABindArgumentsViaIndexInSpelExpressions () {
273
273
274
274
Object [] args = new Object [] { "yess" , "nooo" };
275
275
StandardEvaluationContext evaluationContext = (StandardEvaluationContext ) EvaluationContextProvider .DEFAULT
@@ -284,7 +284,7 @@ void shouldABindArgumentsViaIndexInSpelExpressions() {
284
284
}
285
285
286
286
@ Test // DATAMONGO-2545
287
- void shouldAllowMethodArgumentPlaceholdersInSpelExpressions /*becuase this worked before*/ () {
287
+ public void shouldAllowMethodArgumentPlaceholdersInSpelExpressions /*becuase this worked before*/ () {
288
288
289
289
Object [] args = new Object [] { "yess" , "nooo" };
290
290
StandardEvaluationContext evaluationContext = (StandardEvaluationContext ) EvaluationContextProvider .DEFAULT
@@ -299,7 +299,7 @@ void shouldABindArgumentsViaIndexInSpelExpressions() {
299
299
}
300
300
301
301
@ Test // DATAMONGO-2545
302
- void shouldAllowMethodArgumentPlaceholdersInQuotedSpelExpressions /*becuase this worked before*/ () {
302
+ public void shouldAllowMethodArgumentPlaceholdersInQuotedSpelExpressions /*because this worked before*/ () {
303
303
304
304
Object [] args = new Object [] { "yess" , "nooo" };
305
305
StandardEvaluationContext evaluationContext = (StandardEvaluationContext ) EvaluationContextProvider .DEFAULT
@@ -314,23 +314,23 @@ void shouldABindArgumentsViaIndexInSpelExpressions() {
314
314
}
315
315
316
316
@ Test // DATAMONGO-2545
317
- void evaluatesSpelExpressionDefiningEntireQuery () {
317
+ public void evaluatesSpelExpressionDefiningEntireQuery () {
318
318
319
319
Object [] args = new Object [] {};
320
320
StandardEvaluationContext evaluationContext = (StandardEvaluationContext ) EvaluationContextProvider .DEFAULT
321
321
.getEvaluationContext (args );
322
322
evaluationContext .setRootObject (new DummySecurityObject (new DummyWithId ("wonderwoman" )));
323
323
324
324
String json = "?#{ T(" + this .getClass ().getName ()
325
- + ").isBatman() ? {'_class': { '$eq' : 'region' }} : { '$and' : { {'_class': { '$eq' : 'region' } }, {'user.superviser ': principal.id } } } }" ;
325
+ + ").isBatman() ? {'_class': { '$eq' : 'region' }} : { '$and' : { {'_class': { '$eq' : 'region' } }, {'user.supervisor ': principal.id } } } }" ;
326
326
327
327
ParameterBindingJsonReader reader = new ParameterBindingJsonReader (json ,
328
328
new ParameterBindingContext ((index ) -> args [index ], new SpelExpressionParser (), evaluationContext ));
329
329
Document target = new ParameterBindingDocumentCodec ().decode (reader , DecoderContext .builder ().build ());
330
330
331
331
assertThat (target )
332
332
.isEqualTo (new Document ("$and" , Arrays .asList (new Document ("_class" , new Document ("$eq" , "region" )),
333
- new Document ("user.superviser " , "wonderwoman" ))));
333
+ new Document ("user.supervisor " , "wonderwoman" ))));
334
334
}
335
335
336
336
private static Document parse (String json , Object ... args ) {
0 commit comments