@@ -37,6 +37,7 @@ class CountriesInteractorTests: XCTestCase {
37
37
38
38
final class LoadCountriesTests : CountriesInteractorTests {
39
39
40
+ @MainActor
40
41
func test_filledDB_successfulSearch( ) {
41
42
let list = Country . mockedData
42
43
@@ -136,6 +137,7 @@ final class LoadCountriesTests: CountriesInteractorTests {
136
137
wait ( for: [ exp] , timeout: 2 )
137
138
}
138
139
140
+ @MainActor
139
141
func test_emptyDB_successfulRequest_successfulStoring( ) {
140
142
let list = Country . mockedData
141
143
@@ -173,6 +175,7 @@ final class LoadCountriesTests: CountriesInteractorTests {
173
175
wait ( for: [ exp] , timeout: 2 )
174
176
}
175
177
178
+ @MainActor
176
179
func test_emptyDB_successfulRequest_failedStoring( ) {
177
180
let list = Country . mockedData
178
181
let error = NSError . test
@@ -214,6 +217,7 @@ final class LoadCountriesTests: CountriesInteractorTests {
214
217
215
218
final class LoadCountryDetailsTests : CountriesInteractorTests {
216
219
220
+ @MainActor
217
221
func test_filledDB_successfulSearch( ) {
218
222
let country = Country . mockedData [ 0 ]
219
223
let data = countryDetails ( neighbors: [ ] )
@@ -246,6 +250,7 @@ final class LoadCountryDetailsTests: CountriesInteractorTests {
246
250
wait ( for: [ exp] , timeout: 2 )
247
251
}
248
252
253
+ @MainActor
249
254
func test_filledDB_dataNotFound_failedRequest( ) {
250
255
let country = Country . mockedData [ 0 ]
251
256
let error = NSError . test
@@ -280,6 +285,7 @@ final class LoadCountryDetailsTests: CountriesInteractorTests {
280
285
wait ( for: [ exp] , timeout: 2 )
281
286
}
282
287
288
+ @MainActor
283
289
func test_filledDB_dataNotFound_successfulRequest_failedStoring( ) {
284
290
let country = Country . mockedData [ 0 ]
285
291
let data = countryDetails ( neighbors: [ ] )
@@ -317,6 +323,7 @@ final class LoadCountryDetailsTests: CountriesInteractorTests {
317
323
wait ( for: [ exp] , timeout: 2 )
318
324
}
319
325
326
+ @MainActor
320
327
func test_filledDB_dataNotFound_successfulRequest_successfulStoring( ) {
321
328
let country = Country . mockedData [ 0 ]
322
329
let data = countryDetails ( neighbors: [ ] )
@@ -353,6 +360,7 @@ final class LoadCountryDetailsTests: CountriesInteractorTests {
353
360
wait ( for: [ exp] , timeout: 2 )
354
361
}
355
362
363
+ @MainActor
356
364
func test_stubInteractor( ) {
357
365
let sut = StubCountriesInteractor ( )
358
366
sut. refreshCountriesList ( ) . sinkToResult ( { _ in } ) . store ( in: & subscriptions)
@@ -364,6 +372,7 @@ final class LoadCountryDetailsTests: CountriesInteractorTests {
364
372
365
373
// MARK: - Helper
366
374
375
+ @MainActor
367
376
private func recordAppStateUserDataUpdates( for timeInterval: TimeInterval = 0.5 )
368
377
-> AnyPublisher < [ AppState . UserData ] , Never > {
369
378
return Future < [ AppState . UserData ] , Never > { ( completion) in
0 commit comments