// // URLSessionDataTaskMock .swift // MasKitTests // // Created by Ben Chatelain on 1/5/19. // Copyright © 2019 mas-cli. All rights reserved. // import Foundation // Partial mock subclassing the original class class URLSessionDataTaskMock: URLSessionDataTask { private let closure: () -> Void init(closure: @escaping () -> Void) { self.closure = closure } // We override the 'resume' method and simply call our closure // instead of actually resuming any task. override func resume() { closure() } }