The class GIDAuthorizationUtil contains two utility methods. It helps us test these methods easily and reduce the GIDSIgnInTest complexity vastly.
In GIDSignInTest there are some tests using an OIDAuthorizationRequest. In production GIDSignIn sends an OIDAuthorizationRequest to AppAuth to start the authorization flow. In GIDSignInTest we saved the request and use this to verify the parameters and scopes before sending it to an AppAuth mock. By extracting these method we can verify the request and scopes directly instead of verifying them along with the whole sign-in flow.
The class
GIDAuthorizationUtil
contains two utility methods. It helps us test these methods easily and reduce theGIDSIgnInTest
complexity vastly.In
GIDSignInTest
there are some tests using anOIDAuthorizationRequest
. In productionGIDSignIn
sends anOIDAuthorizationRequest
to AppAuth to start the authorization flow. InGIDSignInTest
we saved the request and use this to verify the parameters and scopes before sending it to an AppAuth mock. By extracting these method we can verify the request and scopes directly instead of verifying them along with the whole sign-in flow.