Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 33 additions & 18 deletions Tests/CoreDataRepositoryTests/BatchRepositoryTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,15 @@ final class BatchRepositoryTests: CoreDataXCTestCase {
receiveCompletion: { completion in
switch completion {
case .finished:
exp.fulfill()
default:
break
case .failure:
XCTFail("Not expecting failure")
exp.fulfill()
}
},
receiveValue: { _ in }
receiveValue: { _ in
exp.fulfill()
}
)
.store(in: &cancellables)
wait(for: [exp], timeout: 5)
Expand Down Expand Up @@ -152,12 +155,15 @@ final class BatchRepositoryTests: CoreDataXCTestCase {
receiveCompletion: { completion in
switch completion {
case .finished:
exp.fulfill()
default:
break
case .failure:
XCTFail("Not expecting failure")
exp.fulfill()
}
},
receiveValue: { _ in }
receiveValue: { _ in
exp.fulfill()
}
)
.store(in: &cancellables)
wait(for: [exp], timeout: 5)
Expand Down Expand Up @@ -189,15 +195,16 @@ final class BatchRepositoryTests: CoreDataXCTestCase {
receiveCompletion: { completion in
switch completion {
case .finished:
exp.fulfill()
default:
break
case .failure:
XCTFail("Not expecting Failure")
exp.fulfill()
}
},
receiveValue: { result in
XCTAssert(result.failed.isEmpty, "None should fail")
resultingMovies = result.success
exp.fulfill()
}
)
.store(in: &cancellables)
Expand Down Expand Up @@ -227,12 +234,15 @@ final class BatchRepositoryTests: CoreDataXCTestCase {
receiveCompletion: { completion in
switch completion {
case .finished:
exp.fulfill()
default:
break
case .failure:
XCTFail("Not expecting Failure")
exp.fulfill()
}
},
receiveValue: { _ in }
receiveValue: { _ in
exp.fulfill()
}
)
.store(in: &cancellables)
wait(for: [exp], timeout: 5)
Expand Down Expand Up @@ -265,15 +275,16 @@ final class BatchRepositoryTests: CoreDataXCTestCase {
receiveCompletion: { completion in
switch completion {
case .finished:
exp.fulfill()
default:
break
case .failure:
XCTFail("Not expecting Failure")
exp.fulfill()
}
},
receiveValue: { result in
XCTAssert(result.failed.isEmpty, "None should fail")
resultingMovies = result.success
exp.fulfill()
}
)
.store(in: &cancellables)
Expand Down Expand Up @@ -304,12 +315,15 @@ final class BatchRepositoryTests: CoreDataXCTestCase {
receiveCompletion: { completion in
switch completion {
case .finished:
exp.fulfill()
default:
break
case .failure:
XCTFail("Not expecting failure")
exp.fulfill()
}
},
receiveValue: { _ in }
receiveValue: { _ in
exp.fulfill()
}
)
.store(in: &cancellables)
wait(for: [exp], timeout: 5)
Expand Down Expand Up @@ -339,14 +353,15 @@ final class BatchRepositoryTests: CoreDataXCTestCase {
receiveCompletion: { completion in
switch completion {
case .finished:
exp.fulfill()
default:
break
case .failure:
XCTFail("Not expecting Failure")
exp.fulfill()
}
},
receiveValue: { result in
XCTAssert(result.failed.isEmpty, "None should fail")
exp.fulfill()
}
)
.store(in: &cancellables)
Expand Down