@Test public void testThatEnvironmentRuleIsNotSatisfiedIfGooglePlayStoreIsNotInstalledOnDevice() { when(environment.isGooglePlayStoreInstalled()).thenReturn(false); final boolean isEnvironmentRuleSatisfied = googlePlayStoreRule.shouldAllowFeedbackPrompt(environment); assertFalse("Environment based rule should not be satisfied", isEnvironmentRuleSatisfied); }
@Override public boolean shouldAllowFeedbackPrompt(@NonNull final IEnvironment environment) { return environment.isGooglePlayStoreInstalled(); }
GooglePlayStoreRule implements IEnvironmentBasedRule { @Override public boolean shouldAllowFeedbackPrompt(@NonNull final IEnvironment environment) { return environment.isGooglePlayStoreInstalled(); } }
GooglePlayStoreRule implements IEnvironmentBasedRule { @Override public boolean shouldAllowFeedbackPrompt(@NonNull final IEnvironment environment) { return environment.isGooglePlayStoreInstalled(); }  }
GooglePlayStoreRule implements IEnvironmentBasedRule { @Override public boolean shouldAllowFeedbackPrompt(@NonNull final IEnvironment environment) { return environment.isGooglePlayStoreInstalled(); }  @Override boolean shouldAllowFeedbackPrompt(@NonNull final IEnvironment environment); @NonNull @Override String getDescription(); }
GooglePlayStoreRule implements IEnvironmentBasedRule { @Override public boolean shouldAllowFeedbackPrompt(@NonNull final IEnvironment environment) { return environment.isGooglePlayStoreInstalled(); }  @Override boolean shouldAllowFeedbackPrompt(@NonNull final IEnvironment environment); @NonNull @Override String getDescription();  }