예제 #1
0
        public void SHOULD_log_operation_and_trace_content()
        {
            //Test
            Sut.HandleForegroundNotification(IosNotification);

            //Assert
            MockAnalyticsService.VerifyStartTrace("Foreground Push Notification");
            MockAnalyticsService.VerifyTrace("Extracting push notification");
            MockAnalyticsService.VerifyTraceProperty("Raw Notification", IosNotification);
            MockAnalyticsService.VerifyTrace("Notification processed");
        }
예제 #2
0
        public async Task SHOULD_log_operation_and_trace_content()
        {
            //Test
            await Sut.HandleNotificationTappedAsync(AndroidIntentProperties);

            //Assert
            MockAnalyticsService.VerifyStartTrace("Push Notification Tapped");
            MockAnalyticsService.VerifyTrace("Extracting push notification");
            MockAnalyticsService.VerifyTraceProperty("Raw Notification", AndroidIntentProperties);
            MockAnalyticsService.VerifyTrace("Notification processed");
        }
예제 #3
0
        public void SHOULD_log_operation_and_trace_content()
        {
            //Test
            Sut.HandleAppLaunchingAsync(Arguments);

            //Assert
            MockAnalyticsService.VerifyStartTrace("Push Notification Tapped");
            MockAnalyticsService.VerifyTrace("Extracting push notification");
            MockAnalyticsService.VerifyTraceProperty("Raw Notification", Arguments);
            MockAnalyticsService.VerifyTrace("Notification processed");
        }
        public void SHOULD_trace_number_of_subscribers()
        {
            //Arrange
            Sut.ObserveForegroundNotifications().Subscribe();

            //Test
            Sut.HandleForegroundNotification(AndroidMessageProperties);

            //Assert
            MockAnalyticsService.VerifyStartTrace("Foreground Push Notification");
            MockAnalyticsService.VerifyTrace("Extracting push notification");
            MockAnalyticsService.VerifyTraceProperty("Raw Notification", AndroidMessageProperties);
            MockAnalyticsService.VerifyTrace("Notification processed");
            MockAnalyticsService.VerifyTrace("Foreground notification being published");
        }