stubLoginWithCredentials method

dynamic stubLoginWithCredentials([
  1. Either<Failure, AuthenticationData>? response
])

Implementation

stubLoginWithCredentials([Either<Failure, AuthenticationData>? response]) {
  when(loginWithCredentials(any, any)).thenAnswer((realInvocation) async =>
      response ??
      right<Failure, AuthenticationData>(
        AuthenticationDataModel(
          id: "id",
          token: "token",
          refreshToken: "refreshToken",
          // user
        ),
      ));
}