Slide 43
Slide 43 text
protocol AuthServiceType {
func logIn(id: String, pw: String, completion: (Response) -> Void)
}
// Production
class AuthService: AuthServiceType {
func logIn(id: String, pw: String, completion: (Response) -> Void) {
// Networking logic
}
}
// Test
class StubAuthService: AuthServiceType {
func logIn(id: String, pw: String, completion: (Response) -> Void) {
// Stub logic
}
}