@Test public void logRenderError_withImageDisplayError_setsEquivalentErrorReason() throws InvalidProtocolBufferException { metricsLoggerClient.logRenderError( BANNER_MESSAGE_MODEL, InAppMessagingErrorReason.IMAGE_DISPLAY_ERROR); verify(engagementMetricsLoggerInterface).logEvent(byteArrayCaptor.capture()); CampaignAnalytics campaignAnalytics = CampaignAnalytics.parser().parseFrom(byteArrayCaptor.getValue()); assertThat(campaignAnalytics.getRenderErrorReason()) .isEqualTo(RenderErrorReason.IMAGE_DISPLAY_ERROR); }
void logRenderError(InAppMessage message, InAppMessagingErrorReason errorReason) { if (!isTestCampaign(message)) { firebaseInstallations .getId() .addOnSuccessListener( id -> engagementMetricsLogger.logEvent( createRenderErrorEntry(message, id, errorTransform.get(errorReason)) .toByteArray())); } developerListenerManager.displayErrorEncountered(message, errorReason); }
MetricsLoggerClient { void logRenderError(InAppMessage message, InAppMessagingErrorReason errorReason) { if (!isTestCampaign(message)) { firebaseInstallations .getId() .addOnSuccessListener( id -> engagementMetricsLogger.logEvent( createRenderErrorEntry(message, id, errorTransform.get(errorReason)) .toByteArray())); } developerListenerManager.displayErrorEncountered(message, errorReason); } }
MetricsLoggerClient { void logRenderError(InAppMessage message, InAppMessagingErrorReason errorReason) { if (!isTestCampaign(message)) { firebaseInstallations .getId() .addOnSuccessListener( id -> engagementMetricsLogger.logEvent( createRenderErrorEntry(message, id, errorTransform.get(errorReason)) .toByteArray())); } developerListenerManager.displayErrorEncountered(message, errorReason); } MetricsLoggerClient(
      EngagementMetricsLoggerInterface engagementMetricsLogger,
      AnalyticsConnector analyticsConnector,
      FirebaseApp firebaseApp,
      FirebaseInstallationsApi firebaseInstallations,
      Clock clock,
      DeveloperListenerManager developerListenerManager); }
MetricsLoggerClient { void logRenderError(InAppMessage message, InAppMessagingErrorReason errorReason) { if (!isTestCampaign(message)) { firebaseInstallations .getId() .addOnSuccessListener( id -> engagementMetricsLogger.logEvent( createRenderErrorEntry(message, id, errorTransform.get(errorReason)) .toByteArray())); } developerListenerManager.displayErrorEncountered(message, errorReason); } MetricsLoggerClient(
      EngagementMetricsLoggerInterface engagementMetricsLogger,
      AnalyticsConnector analyticsConnector,
      FirebaseApp firebaseApp,
      FirebaseInstallationsApi firebaseInstallations,
      Clock clock,
      DeveloperListenerManager developerListenerManager);  }
MetricsLoggerClient { void logRenderError(InAppMessage message, InAppMessagingErrorReason errorReason) { if (!isTestCampaign(message)) { firebaseInstallations .getId() .addOnSuccessListener( id -> engagementMetricsLogger.logEvent( createRenderErrorEntry(message, id, errorTransform.get(errorReason)) .toByteArray())); } developerListenerManager.displayErrorEncountered(message, errorReason); } MetricsLoggerClient(
      EngagementMetricsLoggerInterface engagementMetricsLogger,
      AnalyticsConnector analyticsConnector,
      FirebaseApp firebaseApp,
      FirebaseInstallationsApi firebaseInstallations,
      Clock clock,
      DeveloperListenerManager developerListenerManager);   }