@Override public void onClick(View v) { RateThisApp.stopRateDialog(MainActivity.this); } });
@Test public void stopRateDialog_IsSuccess() { Context context = RuntimeEnvironment.application.getApplicationContext(); RateThisApp.stopRateDialog(context); // check shared pref SharedPreferences sharedPreferences = RuntimeEnvironment.application.getSharedPreferences( PREF_NAME, Context.MODE_PRIVATE); Assert.assertTrue(sharedPreferences.getBoolean(KEY_OPT_OUT, false)); } }