void HandleEventEdited(EventEditedEvent e) { if (e.TimelineEvent is SubstitutionEvent || e.TimelineEvent is LineupEvent) { UpdatePlayersPosition(); } }
public async Task Handle_Success() { // Arrange EventEditedEvent notification = new EventEditedEvent(validEventId); // Act await policy.Handle(notification, CancellationToken.None); // Assert A.CallTo(() => telemetryService.TrackEvent(TelemetryEventNames.EditEvent, A <object> ._)) .MustHaveHappenedOnceExactly(); }
public async Task Handle_InvalidEventId_MustFail() { // Arrange EventEditedEvent notification = CreateNotification(eventId: new Guid("56C45285-782B-4C23-9E10-4877240232E0")); // Act await policy.Handle(notification, CancellationToken.None); // Assert A.CallTo(() => notificationPublisher.PublishAsync( NotificationType.EditEvent, A <string> ._, A <IEnumerable <Diver> > ._, A <Diver> ._, A <Guid> ._, A <Guid?> ._)) .MustNotHaveHappened(); }
public async Task Handle_Success() { // Arrange EventEditedEvent notification = CreateNotification(); // Act await policy.Handle(notification, CancellationToken.None); // Assert A.CallTo(() => notificationPublisher.PublishAsync( NotificationType.EditEvent, A <string> ._, A <IEnumerable <Diver> > ._, A <Diver> ._, validEventId, null)) .MustHaveHappenedOnceExactly(); }
void HandleEventEdited(EventEditedEvent e) { if (e.TimelineEvent is SubstitutionEvent || e.TimelineEvent is LineupEvent) { teamtagger.Reload (); } }