public async Task Handle_Success() { // Arrange var notification = new UserProfileEditedEvent( DiverFactory.JohnDoeDiverId, DiverFactory.JaneDoeDiverId); // Act await policy.Handle(notification, CancellationToken.None); // Assert A.CallTo(() => telemetryService.TrackEvent(TelemetryEventNames.AvatarChanged, A <object> ._)) .MustHaveHappenedOnceExactly(); }
public async Task Handle_Success_MustTriggerTelemetry() { // Arrange var notification = new UserProfileEditedEvent( new Guid("45DA87DA-1EE6-4508-8CE6-061304FF975F"), new Guid("166DCAD2-0ABD-4E22-B4FA-D7A6F92B4C76")); // Act await policy.Handle(notification, CancellationToken.None); // Assert A.CallTo(() => telemetryService.TrackEvent(TelemetryEventNames.UserProfileEdited, A <object> ._)) .MustHaveHappenedOnceExactly(); }