public async Task SHOULD_trace_extracted_notification() { //Arrange _target = DeviceTarget.iOS("pnsHandle"); //Act await Sut.SendNotificationToTargetAsync(_pushNotification, _target, MockNotificationHub.Object); //Assert MockAnalyticsService.VerifyTrace("Native push notification extracted"); MockAnalyticsService.VerifyTraceProperty(_iosNotification.GetType().Name, _iosNotification); }
public async Task SHOULD_extract_notification_for_target_platform_and_send_to_target_pnsHandle() { //Arrange _target = DeviceTarget.iOS("pnsHandle"); //Act await Sut.SendNotificationToTargetAsync(_pushNotification, _target, MockNotificationHub.Object); //Assert MockNativeNotificationExtractor.Mock.Verify(x => x.ExtractNotification(RuntimePlatform.iOS, _pushNotification)); MockNotificationHubClientProxy.Mock.Verify(x => x.SendDirectNotificationAsync(_iosNotification, It.Is <List <string> >(y => y[0] == "pnsHandle"))); }