コード例 #1
0
 void HandleEventEdited(EventEditedEvent e)
 {
     if (e.TimelineEvent is SubstitutionEvent || e.TimelineEvent is LineupEvent)
     {
         UpdatePlayersPosition();
     }
 }
コード例 #2
0
        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();
        }
コード例 #3
0
        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();
        }
コード例 #4
0
        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();
        }
コード例 #5
0
ファイル: CodingWidget.cs プロジェクト: LongoMatch/longomatch
 void HandleEventEdited(EventEditedEvent e)
 {
     if (e.TimelineEvent is SubstitutionEvent || e.TimelineEvent is LineupEvent) {
         teamtagger.Reload ();
     }
 }