@Test public void stream_onAppOpen_dataCollectionDisabled_doesNotFetch() { when(dataCollectionHelper.isAutomaticDataCollectionEnabled()).thenReturn(false); appForegroundEmitter.onNext(ON_FOREGROUND_EVENT_NAME); subscriber.assertNoValues(); verify(mockApiClient, times(0)).getFiams(any(), any()); verify(campaignCacheClient, times(1)).put(InAppMessageStreamManager.cacheExpiringResponse()); }
@VisibleForTesting static FetchEligibleCampaignsResponse cacheExpiringResponse() { return FetchEligibleCampaignsResponse.newBuilder().setExpirationEpochTimestampMillis(1).build(); }
InAppMessageStreamManager { @VisibleForTesting static FetchEligibleCampaignsResponse cacheExpiringResponse() { return FetchEligibleCampaignsResponse.newBuilder().setExpirationEpochTimestampMillis(1).build(); } }
InAppMessageStreamManager { @VisibleForTesting static FetchEligibleCampaignsResponse cacheExpiringResponse() { return FetchEligibleCampaignsResponse.newBuilder().setExpirationEpochTimestampMillis(1).build(); } @Inject  InAppMessageStreamManager(
      @AppForeground ConnectableFlowable<String> appForegroundEventFlowable,
      @ProgrammaticTrigger ConnectableFlowable<String> programmaticTriggerEventFlowable,
      CampaignCacheClient campaignCacheClient,
      Clock clock,
      ApiClient apiClient,
      AnalyticsEventsManager analyticsEventsManager,
      Schedulers schedulers,
      ImpressionStorageClient impressionStorageClient,
      RateLimiterClient rateLimiterClient,
      @AppForeground RateLimit appForegroundRateLimit,
      TestDeviceHelper testDeviceHelper,
      FirebaseInstallationsApi firebaseInstallations,
      DataCollectionHelper dataCollectionHelper,
      AbtIntegrationHelper abtIntegrationHelper); }
InAppMessageStreamManager { @VisibleForTesting static FetchEligibleCampaignsResponse cacheExpiringResponse() { return FetchEligibleCampaignsResponse.newBuilder().setExpirationEpochTimestampMillis(1).build(); } @Inject  InAppMessageStreamManager(
      @AppForeground ConnectableFlowable<String> appForegroundEventFlowable,
      @ProgrammaticTrigger ConnectableFlowable<String> programmaticTriggerEventFlowable,
      CampaignCacheClient campaignCacheClient,
      Clock clock,
      ApiClient apiClient,
      AnalyticsEventsManager analyticsEventsManager,
      Schedulers schedulers,
      ImpressionStorageClient impressionStorageClient,
      RateLimiterClient rateLimiterClient,
      @AppForeground RateLimit appForegroundRateLimit,
      TestDeviceHelper testDeviceHelper,
      FirebaseInstallationsApi firebaseInstallations,
      DataCollectionHelper dataCollectionHelper,
      AbtIntegrationHelper abtIntegrationHelper); static boolean isAppForegroundEvent(TriggeringCondition event); static boolean isAppForegroundEvent(String event); Flowable<TriggeredInAppMessage> createFirebaseInAppMessageStream(); }
InAppMessageStreamManager { @VisibleForTesting static FetchEligibleCampaignsResponse cacheExpiringResponse() { return FetchEligibleCampaignsResponse.newBuilder().setExpirationEpochTimestampMillis(1).build(); } @Inject  InAppMessageStreamManager(
      @AppForeground ConnectableFlowable<String> appForegroundEventFlowable,
      @ProgrammaticTrigger ConnectableFlowable<String> programmaticTriggerEventFlowable,
      CampaignCacheClient campaignCacheClient,
      Clock clock,
      ApiClient apiClient,
      AnalyticsEventsManager analyticsEventsManager,
      Schedulers schedulers,
      ImpressionStorageClient impressionStorageClient,
      RateLimiterClient rateLimiterClient,
      @AppForeground RateLimit appForegroundRateLimit,
      TestDeviceHelper testDeviceHelper,
      FirebaseInstallationsApi firebaseInstallations,
      DataCollectionHelper dataCollectionHelper,
      AbtIntegrationHelper abtIntegrationHelper); static boolean isAppForegroundEvent(TriggeringCondition event); static boolean isAppForegroundEvent(String event); Flowable<TriggeredInAppMessage> createFirebaseInAppMessageStream(); static final String ON_FOREGROUND; }