Skip to content
This repository was archived by the owner on Mar 23, 2025. It is now read-only.

Commit 15da4b1

Browse files
committed
Remove obsolete MockNetworkTransport
1 parent 099c024 commit 15da4b1

File tree

3 files changed

+12
-52
lines changed

3 files changed

+12
-52
lines changed

ApolloDeveloperKit.xcodeproj/project.pbxproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
5B0EC95E22B6D728003D7933 /* DebuggableRequestChainNetworkTransportTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B0EC95D22B6D728003D7933 /* DebuggableRequestChainNetworkTransportTests.swift */; };
1515
5B15067424F149960081B1E8 /* Schema+JSONEncodable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B15067324F149960081B1E8 /* Schema+JSONEncodable.swift */; };
1616
5B15067624F14B520081B1E8 /* ErrorLike+Error.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B15067524F14B520081B1E8 /* ErrorLike+Error.swift */; };
17-
5B16DECD23F45C5300EFEA16 /* MockNetworkTransport.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B16DECC23F45C5300EFEA16 /* MockNetworkTransport.swift */; };
1817
5B1DFA0E2526377E00594E80 /* AddressInfoErrorTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B1DFA0D2526377E00594E80 /* AddressInfoErrorTests.swift */; };
1918
5B207730236E098700817E45 /* HTTPChunkedResponse.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B20772F236E098700817E45 /* HTTPChunkedResponse.swift */; };
2019
5B207732236E0FD800817E45 /* HTTPChunkedResponseTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B207731236E0FD800817E45 /* HTTPChunkedResponseTests.swift */; };
@@ -929,7 +928,6 @@
929928
5BA76BC2240ABAB600501193 /* BackgroundTaskTests.swift in Sources */,
930929
5B2E1B29230C2CE0003C85CB /* InterfaceAddressIteratorTests.swift in Sources */,
931930
5B0EC95E22B6D728003D7933 /* DebuggableRequestChainNetworkTransportTests.swift in Sources */,
932-
5B16DECD23F45C5300EFEA16 /* MockNetworkTransport.swift in Sources */,
933931
5B3A839322C72197002B4FFB /* Reference+JSONEncodableTests.swift in Sources */,
934932
5B53B15524FBFD0D00A946D4 /* ApolloDeveloperKitTests.swift in Sources */,
935933
5BCE500E24F4C06400310E26 /* MockFileDescriptorDuplicator.swift in Sources */,

Tests/ApolloDeveloperKitTests/Store/OperationStoreControllerTests.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,15 @@ private class MockOperationStore: OperationStore {
140140
return State(mutations: [], queries: [])
141141
}
142142
}
143+
144+
private class MockNetworkTransport: NetworkTransport {
145+
func send<Operation>(operation: Operation, cachePolicy: CachePolicy, contextIdentifier: UUID?, callbackQueue: DispatchQueue, completionHandler: @escaping (Result<GraphQLResult<Operation.Data>, Error>) -> Void) -> Cancellable where Operation : GraphQLOperation {
146+
return MockCancellable()
147+
}
148+
}
149+
150+
private class MockCancellable: Cancellable {
151+
func cancel() {
152+
// Do nothing.
153+
}
154+
}

Tests/ApolloDeveloperKitTests/TestHelpers/MockNetworkTransport.swift

Lines changed: 0 additions & 50 deletions
This file was deleted.

0 commit comments

Comments
 (0)