I’ve discovered a couple of errors in the challenge solution documentation. In the class MockCloudNetworkService, the class should inherit from CloudNetworkManager, not CloudNetworkService, and the public methods login and loadPancakeHouses should be overridden:
public class MockCloudNetworkService: CloudNetworkManager {
public lazy var pancakeHouses: [PancakeHouse] = {
let bundle = Bundle(for: type(of: self))
let path = bundle.path(forResource: "test_pancake_houses", ofType: "plist")!
let array = NSArray(contentsOfFile: path)
return PancakeHouse.from(array as! [[String : Any]])
}()
public override func login(userName: String, password: String,
success: () -> (),
failure: (Error) -> ()) {
success()
}
public override func loadPancakeHouses(success: @escaping ([PancakeHouse]) -> (),
failure: @escaping (CloudNetworkError) -> ()) {
success(pancakeHouses)
}
}
hope this helps anyone who might get stuck
@jrg.developer wondering where to get the original project file as I want to follow the steps with this video?