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:
              "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyLCJleHAiOjE1MTYyMzkwMjJ9.4Adcj3UFYzPUVaVF43FmMab6RlaQD8A9V8wFzzht-KQ",
          refreshToken: "refreshToken",
          // user
        ),
      ));
}