@@ -66,8 +66,8 @@ class MongoDatabaseSpecification extends Specification {
66
66
67
67
def ' should throw IllegalArgumentException if name is invalid' () {
68
68
when :
69
- new MongoDatabaseImpl (' a.b' , codecRegistry, readPreference, writeConcern, false , false , readConcern, JAVA_LEGACY , new
70
- TestOperationExecutor ([]))
69
+ new MongoDatabaseImpl (' a.b' , codecRegistry, readPreference, writeConcern, false , false , readConcern, JAVA_LEGACY ,
70
+ new TestOperationExecutor ([]))
71
71
72
72
then :
73
73
thrown(IllegalArgumentException )
@@ -179,7 +179,7 @@ class MongoDatabaseSpecification extends Specification {
179
179
def runCommandMethod = database. &runCommand
180
180
181
181
when :
182
- TestHelper . execute(runCommandMethod, session, command)
182
+ execute(runCommandMethod, session, command)
183
183
def operation = executor. getReadOperation() as CommandReadOperation<Document >
184
184
185
185
then :
@@ -188,7 +188,7 @@ class MongoDatabaseSpecification extends Specification {
188
188
executor. getReadPreference() == primary()
189
189
190
190
when :
191
- TestHelper . execute(runCommandMethod, session, command, primaryPreferred())
191
+ execute(runCommandMethod, session, command, primaryPreferred())
192
192
operation = executor. getReadOperation() as CommandReadOperation<Document >
193
193
194
194
then :
@@ -197,7 +197,7 @@ class MongoDatabaseSpecification extends Specification {
197
197
executor. getReadPreference() == primaryPreferred()
198
198
199
199
when :
200
- TestHelper . execute(runCommandMethod, session, command, BsonDocument )
200
+ execute(runCommandMethod, session, command, BsonDocument )
201
201
operation = executor. getReadOperation() as CommandReadOperation<BsonDocument >
202
202
203
203
then :
@@ -206,7 +206,7 @@ class MongoDatabaseSpecification extends Specification {
206
206
executor. getReadPreference() == primary()
207
207
208
208
when :
209
- TestHelper . execute(runCommandMethod, session, command, primaryPreferred(), BsonDocument )
209
+ execute(runCommandMethod, session, command, primaryPreferred(), BsonDocument )
210
210
operation = executor. getReadOperation() as CommandReadOperation<BsonDocument >
211
211
212
212
then :
@@ -226,7 +226,7 @@ class MongoDatabaseSpecification extends Specification {
226
226
def dropMethod = database. &drop
227
227
228
228
when :
229
- TestHelper . execute(dropMethod, session)
229
+ execute(dropMethod, session)
230
230
def operation = executor. getWriteOperation() as DropDatabaseOperation
231
231
232
232
then :
@@ -246,21 +246,21 @@ class MongoDatabaseSpecification extends Specification {
246
246
def listCollectionNamesMethod = database. &listCollectionNames
247
247
248
248
when :
249
- def listCollectionIterable = TestHelper . execute(listCollectionsMethod, session)
249
+ def listCollectionIterable = execute(listCollectionsMethod, session)
250
250
251
251
then :
252
252
expect listCollectionIterable, isTheSameAs(new ListCollectionsIterableImpl<> (session, name, false ,
253
253
Document , codecRegistry, primary(), executor, false ))
254
254
255
255
when :
256
- listCollectionIterable = TestHelper . execute(listCollectionsMethod, session, BsonDocument )
256
+ listCollectionIterable = execute(listCollectionsMethod, session, BsonDocument )
257
257
258
258
then :
259
259
expect listCollectionIterable, isTheSameAs(new ListCollectionsIterableImpl<> (session, name, false ,
260
260
BsonDocument , codecRegistry, primary(), executor, false ))
261
261
262
262
when :
263
- def listCollectionNamesIterable = TestHelper . execute(listCollectionNamesMethod, session)
263
+ def listCollectionNamesIterable = execute(listCollectionNamesMethod, session)
264
264
265
265
then :
266
266
// listCollectionNamesIterable is an instance of a MappingIterable, so have to get the mapped iterable inside it
@@ -280,7 +280,7 @@ class MongoDatabaseSpecification extends Specification {
280
280
def createCollectionMethod = database. &createCollection
281
281
282
282
when :
283
- TestHelper . execute(createCollectionMethod, session, collectionName)
283
+ execute(createCollectionMethod, session, collectionName)
284
284
def operation = executor. getWriteOperation() as CreateCollectionOperation
285
285
286
286
then :
@@ -299,7 +299,7 @@ class MongoDatabaseSpecification extends Specification {
299
299
.validationAction(ValidationAction . WARN ))
300
300
.collation(collation)
301
301
302
- TestHelper . execute(createCollectionMethod, session, collectionName, createCollectionOptions)
302
+ execute(createCollectionMethod, session, collectionName, createCollectionOptions)
303
303
operation = executor. getWriteOperation() as CreateCollectionOperation
304
304
305
305
then :
@@ -323,15 +323,15 @@ class MongoDatabaseSpecification extends Specification {
323
323
given :
324
324
def viewName = ' view1'
325
325
def viewOn = ' col1'
326
- def pipeline = [new Document (' $match' , new Document (' x' , true ))];
326
+ def pipeline = [new Document (' $match' , new Document (' x' , true ))]
327
327
def writeConcern = WriteConcern . JOURNALED
328
328
def executor = new TestOperationExecutor ([null , null ])
329
329
def database = new MongoDatabaseImpl (name, codecRegistry, readPreference, writeConcern, false , false , readConcern, JAVA_LEGACY ,
330
330
executor)
331
331
def createViewMethod = database. &createView
332
332
333
333
when :
334
- TestHelper . execute(createViewMethod, session, viewName, viewOn, pipeline)
334
+ execute(createViewMethod, session, viewName, viewOn, pipeline)
335
335
def operation = executor. getWriteOperation() as CreateViewOperation
336
336
337
337
then :
@@ -340,7 +340,7 @@ class MongoDatabaseSpecification extends Specification {
340
340
executor. getClientSession() == session
341
341
342
342
when :
343
- TestHelper . execute(createViewMethod, session, viewName, viewOn, pipeline, new CreateViewOptions (). collation(collation))
343
+ execute(createViewMethod, session, viewName, viewOn, pipeline, new CreateViewOptions (). collation(collation))
344
344
operation = executor. getWriteOperation() as CreateViewOperation
345
345
346
346
then :
0 commit comments