BaseOAuthFragment extends Fragment { public String buildLoginUrl() { return getLoginUrl() + "?redirect_uri=" + getRedirectUri() + "&response_type=code&client_id=" + getClientId() + "&scope=" + getScope(); }  @Override View onCreateView(LayoutInflater inflater, ViewGroup viewGroup, Bundle savedInstanceState); WebViewClient getWebViewClient(); TokenGet getTokenAsyncTask(String authCode); @Override void onStart(); void superOnStart(); void startLogin(); String buildLoginUrl(); void finishAuthorization(); abstract String getLoginUrl(); abstract String getScope(); abstract String getTokenUrl(); abstract String getClientId(); abstract String getClientSecret(); abstract String getRedirectUri(); abstract String getGrantType(); abstract void saveAuthToken(String authToken, long expire, String refreshToken, String userId); public WebView loginWebView; }
@Test public void test_buildLoginUrl() { assertEquals( "login_url?redirect_uri=redirect_url&response_type=code&client_id=client_id&scope=scope", fragment.buildLoginUrl() ); }