@Test public void logImpression_alertsImpressionListenerAndSetsConversionPropWithoutActions() { metricsLoggerClient = new MetricsLoggerClient( engagementMetricsLoggerInterface, analyticsConnector, firebaseApp, firebaseInstallations, clock, developerListenerManager); metricsLoggerClient.logImpression(CARD_MESSAGE_WITHOUT_ACTIONS); verify(developerListenerManager, times(1)).impressionDetected(CARD_MESSAGE_WITHOUT_ACTIONS); verify(analyticsConnector, times(1)) .setUserProperty( AnalyticsConstants.ORIGIN_FIAM, AnalyticsConstants.USER_PROPERTY_FIREBASE_LAST_NOTIFICATION, "fiam:" + CAMPAIGN_ID_STRING); }
void logImpression(InAppMessage message) { if (!isTestCampaign(message)) { firebaseInstallations .getId() .addOnSuccessListener( id -> engagementMetricsLogger.logEvent( createEventEntry(message, id, IMPRESSION_EVENT_TYPE).toByteArray())); logEventAsync( message, AnalyticsConstants.ANALYTICS_IMPRESSION_EVENT, impressionCountsAsConversion(message)); } developerListenerManager.impressionDetected(message); }
MetricsLoggerClient { void logImpression(InAppMessage message) { if (!isTestCampaign(message)) { firebaseInstallations .getId() .addOnSuccessListener( id -> engagementMetricsLogger.logEvent( createEventEntry(message, id, IMPRESSION_EVENT_TYPE).toByteArray())); logEventAsync( message, AnalyticsConstants.ANALYTICS_IMPRESSION_EVENT, impressionCountsAsConversion(message)); } developerListenerManager.impressionDetected(message); } }
MetricsLoggerClient { void logImpression(InAppMessage message) { if (!isTestCampaign(message)) { firebaseInstallations .getId() .addOnSuccessListener( id -> engagementMetricsLogger.logEvent( createEventEntry(message, id, IMPRESSION_EVENT_TYPE).toByteArray())); logEventAsync( message, AnalyticsConstants.ANALYTICS_IMPRESSION_EVENT, impressionCountsAsConversion(message)); } developerListenerManager.impressionDetected(message); } MetricsLoggerClient(
      EngagementMetricsLoggerInterface engagementMetricsLogger,
      AnalyticsConnector analyticsConnector,
      FirebaseApp firebaseApp,
      FirebaseInstallationsApi firebaseInstallations,
      Clock clock,
      DeveloperListenerManager developerListenerManager); }
MetricsLoggerClient { void logImpression(InAppMessage message) { if (!isTestCampaign(message)) { firebaseInstallations .getId() .addOnSuccessListener( id -> engagementMetricsLogger.logEvent( createEventEntry(message, id, IMPRESSION_EVENT_TYPE).toByteArray())); logEventAsync( message, AnalyticsConstants.ANALYTICS_IMPRESSION_EVENT, impressionCountsAsConversion(message)); } developerListenerManager.impressionDetected(message); } MetricsLoggerClient(
      EngagementMetricsLoggerInterface engagementMetricsLogger,
      AnalyticsConnector analyticsConnector,
      FirebaseApp firebaseApp,
      FirebaseInstallationsApi firebaseInstallations,
      Clock clock,
      DeveloperListenerManager developerListenerManager);  }
MetricsLoggerClient { void logImpression(InAppMessage message) { if (!isTestCampaign(message)) { firebaseInstallations .getId() .addOnSuccessListener( id -> engagementMetricsLogger.logEvent( createEventEntry(message, id, IMPRESSION_EVENT_TYPE).toByteArray())); logEventAsync( message, AnalyticsConstants.ANALYTICS_IMPRESSION_EVENT, impressionCountsAsConversion(message)); } developerListenerManager.impressionDetected(message); } MetricsLoggerClient(
      EngagementMetricsLoggerInterface engagementMetricsLogger,
      AnalyticsConnector analyticsConnector,
      FirebaseApp firebaseApp,
      FirebaseInstallationsApi firebaseInstallations,
      Clock clock,
      DeveloperListenerManager developerListenerManager);   }