Skip to content

Instantly share code, notes, and snippets.

@IvanShafran
Last active August 22, 2019 10:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save IvanShafran/f30549c7c0789b3122bbe518f82b5f21 to your computer and use it in GitHub Desktop.
Save IvanShafran/f30549c7c0789b3122bbe518f82b5f21 to your computer and use it in GitHub Desktop.
public class ShowRateUsLogicTest {
private RateUsPreferencesMock rateUsPreferences;
private BuyPreferencesMock buyPreferences;
private TimeMock time;
private ShowRateUsLogic showRateUsLogic;
@Test public void test1() {
rateUsPreferences = new RateUsPreferencesMock();
buyPreferences = new BuyPreferencesMock();
time = new TimeMock();
showRateUsLogic = new ShowRateUsLogic(rateUsPreferences, buyPreferences, time);
buyPreferences.incrementBuyCount();
time.setCurrentTimeMillis(new Date(2019, 6, 7).getTime());
Assert.assertFalse(showRateUsLogic.shouldShowRateUs());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment