Closed iadcialim closed 3 years ago
@TadeasKriz can u guide me? thanks a lot
Never mind I have solved this one. My matcher is checking if LoginRequest variables are of the same instance. In my case, it does not have to be. As long as they have the same username value, then I consider as the same.
extension LoginRequest: Matchable {
public var matcher: ParameterMatcher<LoginRequest> {
return ParameterMatcher<LoginRequest>() { loginRequest in
return loginRequest.userName == self.userName
}
}
public typealias MatchedType = LoginRequest
}
This test is working
This one is throwing "No stub for method
login(request: LoginRequest) -> Observable<User>
using parameters sampletest.LoginRequest. (NSInternalInconsistencyException)"The difference is on the first one, I am passing any() while in the 2nd its a concrete class. I'm suspecting its because of my extension of LoginRequest to conform to Matchable
Source code: sampletest.zip