@@ -88,12 +88,15 @@ final class BatchRepositoryTests: CoreDataXCTestCase {
8888 receiveCompletion: { completion in
8989 switch completion {
9090 case . finished:
91- exp . fulfill ( )
92- default :
91+ break
92+ case . failure :
9393 XCTFail ( " Not expecting failure " )
94+ exp. fulfill ( )
9495 }
9596 } ,
96- receiveValue: { _ in }
97+ receiveValue: { _ in
98+ exp. fulfill ( )
99+ }
97100 )
98101 . store ( in: & cancellables)
99102 wait ( for: [ exp] , timeout: 5 )
@@ -152,12 +155,15 @@ final class BatchRepositoryTests: CoreDataXCTestCase {
152155 receiveCompletion: { completion in
153156 switch completion {
154157 case . finished:
155- exp . fulfill ( )
156- default :
158+ break
159+ case . failure :
157160 XCTFail ( " Not expecting failure " )
161+ exp. fulfill ( )
158162 }
159163 } ,
160- receiveValue: { _ in }
164+ receiveValue: { _ in
165+ exp. fulfill ( )
166+ }
161167 )
162168 . store ( in: & cancellables)
163169 wait ( for: [ exp] , timeout: 5 )
@@ -189,15 +195,16 @@ final class BatchRepositoryTests: CoreDataXCTestCase {
189195 receiveCompletion: { completion in
190196 switch completion {
191197 case . finished:
192- exp . fulfill ( )
193- default :
198+ break
199+ case . failure :
194200 XCTFail ( " Not expecting Failure " )
195201 exp. fulfill ( )
196202 }
197203 } ,
198204 receiveValue: { result in
199205 XCTAssert ( result. failed. isEmpty, " None should fail " )
200206 resultingMovies = result. success
207+ exp. fulfill ( )
201208 }
202209 )
203210 . store ( in: & cancellables)
@@ -227,12 +234,15 @@ final class BatchRepositoryTests: CoreDataXCTestCase {
227234 receiveCompletion: { completion in
228235 switch completion {
229236 case . finished:
230- exp . fulfill ( )
231- default :
237+ break
238+ case . failure :
232239 XCTFail ( " Not expecting Failure " )
240+ exp. fulfill ( )
233241 }
234242 } ,
235- receiveValue: { _ in }
243+ receiveValue: { _ in
244+ exp. fulfill ( )
245+ }
236246 )
237247 . store ( in: & cancellables)
238248 wait ( for: [ exp] , timeout: 5 )
@@ -265,15 +275,16 @@ final class BatchRepositoryTests: CoreDataXCTestCase {
265275 receiveCompletion: { completion in
266276 switch completion {
267277 case . finished:
268- exp . fulfill ( )
269- default :
278+ break
279+ case . failure :
270280 XCTFail ( " Not expecting Failure " )
271281 exp. fulfill ( )
272282 }
273283 } ,
274284 receiveValue: { result in
275285 XCTAssert ( result. failed. isEmpty, " None should fail " )
276286 resultingMovies = result. success
287+ exp. fulfill ( )
277288 }
278289 )
279290 . store ( in: & cancellables)
@@ -304,12 +315,15 @@ final class BatchRepositoryTests: CoreDataXCTestCase {
304315 receiveCompletion: { completion in
305316 switch completion {
306317 case . finished:
307- exp . fulfill ( )
308- default :
318+ break
319+ case . failure :
309320 XCTFail ( " Not expecting failure " )
321+ exp. fulfill ( )
310322 }
311323 } ,
312- receiveValue: { _ in }
324+ receiveValue: { _ in
325+ exp. fulfill ( )
326+ }
313327 )
314328 . store ( in: & cancellables)
315329 wait ( for: [ exp] , timeout: 5 )
@@ -339,14 +353,15 @@ final class BatchRepositoryTests: CoreDataXCTestCase {
339353 receiveCompletion: { completion in
340354 switch completion {
341355 case . finished:
342- exp . fulfill ( )
343- default :
356+ break
357+ case . failure :
344358 XCTFail ( " Not expecting Failure " )
345359 exp. fulfill ( )
346360 }
347361 } ,
348362 receiveValue: { result in
349363 XCTAssert ( result. failed. isEmpty, " None should fail " )
364+ exp. fulfill ( )
350365 }
351366 )
352367 . store ( in: & cancellables)
0 commit comments