118
118
@ ContextConfiguration ("classpath:infrastructure.xml" )
119
119
public class MongoTemplateTests {
120
120
121
- private static final org .springframework .data .util .Version TWO_DOT_FOUR = org .springframework .data .util .Version
122
- .parse ("2.4" );
123
- private static final org .springframework .data .util .Version THREE_DOT_FOUR = org .springframework .data .util .Version
124
- .parse ("3.4" );
125
-
126
121
@ Autowired MongoTemplate template ;
127
122
@ Autowired MongoDbFactory factory ;
128
123
@@ -2331,10 +2326,9 @@ public void updatesShouldRetainTypeInformationEvenForCollections() {
2331
2326
}
2332
2327
2333
2328
@ Test // DATAMONGO-812
2329
+ @ MongoVersion (asOf = "2.4" )
2334
2330
public void updateMultiShouldAddValuesCorrectlyWhenUsingPushEachWithComplexTypes () {
2335
2331
2336
- assumeThat (mongoVersion .isGreaterThanOrEqualTo (TWO_DOT_FOUR ), is (true ));
2337
-
2338
2332
DocumentWithCollection document = new DocumentWithCollection (Collections .<Model > emptyList ());
2339
2333
template .save (document );
2340
2334
Query query = query (where ("id" ).is (document .id ));
@@ -2347,10 +2341,9 @@ public void updateMultiShouldAddValuesCorrectlyWhenUsingPushEachWithComplexTypes
2347
2341
}
2348
2342
2349
2343
@ Test // DATAMONGO-812
2344
+ @ MongoVersion (asOf = "2.4" )
2350
2345
public void updateMultiShouldAddValuesCorrectlyWhenUsingPushEachWithSimpleTypes () {
2351
2346
2352
- assumeThat (mongoVersion .isGreaterThanOrEqualTo (TWO_DOT_FOUR ), is (true ));
2353
-
2354
2347
DocumentWithCollectionOfSimpleType document = new DocumentWithCollectionOfSimpleType ();
2355
2348
document .values = Arrays .asList ("spring" );
2356
2349
template .save (document );
@@ -3214,14 +3207,11 @@ public void findsByGenericNestedListElements() {
3214
3207
assertThat (template .findOne (query , DocumentWithCollection .class ), is (equalTo (dwc )));
3215
3208
}
3216
3209
3217
- /**
3218
- * @see DATAMONGO-1517
3219
- */
3220
- @ Test
3210
+ @ Test // DATAMONGO-1517
3211
+ @ MongoVersion (asOf = "3.4" )
3221
3212
public void decimal128TypeShouldBeSavedAndLoadedCorrectly ()
3222
3213
throws NoSuchMethodException , IllegalAccessException , InvocationTargetException , InstantiationException {
3223
3214
3224
- assumeThat (mongoVersion .isGreaterThanOrEqualTo (THREE_DOT_FOUR ), is (true ));
3225
3215
assumeThat (MongoClientVersion .isMongo34Driver (), is (true ));
3226
3216
3227
3217
Class <?> decimal128Type = ClassUtils .resolveClassName ("org.bson.types.Decimal128" , null );
0 commit comments