Currently, if I want to mock the method User.linkWithProvider, which returns a UserCredential, I have to implement my own mock for UserCredential.
I'd prefer to simply re-use your implementation so I can have something like the following:
when(() => firebaseAuth.currentUser!.linkWithProvider(any()))
.thenAnswer((_) async => Future.value(MockUserCredential(
mockUser: firebaseAuth.currentUser!,
));
Any reason why MockUserCredential shouldn't be exported and made available?
Currently, if I want to mock the method
User.linkWithProvider, which returns aUserCredential, I have to implement my own mock for UserCredential.I'd prefer to simply re-use your implementation so I can have something like the following:
Any reason why
MockUserCredentialshouldn't be exported and made available?