Trying to understand mocking google sign-in for Flutter

Viewed 220

What I'm trying to do is test our sign-in widget for widget tests and later, integration testing and E2E testing.

So I have the following two mocks. They both seem to require each other to work.

google_sign_in_mocks 0.2.1 https://pub.dev/packages/google_sign_in_mocks

firebase_auth_mocks 0.8.1 https://pub.dev/packages/firebase_auth_mocks

What I don't understand is how to use them. I'm going through the docs and examples, and I don't get it.

For instance, I am looking at the google_sign_in_mocks example and I don't understand where MockGoogleSignIn, googleSignIn and .authentication comes from.

I'm reading additional docs like https://firebase.flutter.dev/docs/auth/usage, but it feels like things are spiraling out of control.

Can someone help explain some of this for me?

0 Answers
Related