Esempio n. 1
0
        public async Task Should_send_request()
        {
            var mediator = new Mock <IMediator>();

            mediator
            .Setup(x => x.Send(
                       It.IsAny <GameStart.Request>(),
                       It.IsAny <CancellationToken>()))
            .ReturnsAsync(new GameStart.Response());

            var subject = new GameStartNotificationHandler(
                mediator.Object);

            var notification = new GameStartNotification(GameId);

            await subject.Handle(notification, default);

            mediator.Verify(x => x.Send(
                                It.Is <GameStart.Request>(y => y.GameId == GameId),
                                It.IsAny <CancellationToken>()));
        }
Esempio n. 2
0
 public void StartGameNotification(GameStartNotification gameStartNotification)
 {
     throw new NotImplementedException();
 }
Esempio n. 3
0
 public void StartGameNotification(GameStartNotification gameStartNotification)
 {
 }
Esempio n. 4
0
 public void StartGameNotification(GameStartNotification gameStartNotification)
 {
     this.ShotHistory = new List <Shot>();
 }
Esempio n. 5
0
 public void StartGameNotification(GameStartNotification gameStartNotification)
 {
     this.ShotHistory = new List <Shot>();
     this.SearchShots = null;
     this.Finds       = null;
 }