@Test public void smartcarAuth_authUrlBuilder_testMode() { String clientId = "client123"; String redirectUri = "scclient123: String redirectUriEncoded = "scclient123%3A%2F%2Ftest"; String[] scope = {"read_odometer", "read_vin"}; String expectedUri = "https: "&client_id=" + clientId + "&redirect_uri=" + redirectUriEncoded + "&mode=test&scope=read_odometer%20read_vin"; SmartcarAuth smartcarAuth = new SmartcarAuth(clientId, redirectUri, scope, true, null); String requestUri = smartcarAuth.authUrlBuilder().build(); assertEquals(expectedUri, requestUri); }
public AuthUrlBuilder authUrlBuilder() { return new AuthUrlBuilder(); }
SmartcarAuth { public AuthUrlBuilder authUrlBuilder() { return new AuthUrlBuilder(); } }
SmartcarAuth { public AuthUrlBuilder authUrlBuilder() { return new AuthUrlBuilder(); } SmartcarAuth(String clientId, String redirectUri, String[] scope,
                        SmartcarCallback callback);  SmartcarAuth(String clientId, String redirectUri, String[] scope, boolean testMode,
                        SmartcarCallback callback); }
SmartcarAuth { public AuthUrlBuilder authUrlBuilder() { return new AuthUrlBuilder(); } SmartcarAuth(String clientId, String redirectUri, String[] scope,
                        SmartcarCallback callback);  SmartcarAuth(String clientId, String redirectUri, String[] scope, boolean testMode,
                        SmartcarCallback callback); AuthUrlBuilder authUrlBuilder(); void addClickHandler(final Context context, final View view); void addClickHandler(final Context context, final View view, final String authUrl); void launchAuthFlow(final Context context); void launchAuthFlow(final Context context, final String authUrl); }
SmartcarAuth { public AuthUrlBuilder authUrlBuilder() { return new AuthUrlBuilder(); } SmartcarAuth(String clientId, String redirectUri, String[] scope,
                        SmartcarCallback callback);  SmartcarAuth(String clientId, String redirectUri, String[] scope, boolean testMode,
                        SmartcarCallback callback); AuthUrlBuilder authUrlBuilder(); void addClickHandler(final Context context, final View view); void addClickHandler(final Context context, final View view, final String authUrl); void launchAuthFlow(final Context context); void launchAuthFlow(final Context context, final String authUrl);  }