コード例 #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>()));
        }
コード例 #2
0
 public void StartGameNotification(GameStartNotification gameStartNotification)
 {
     throw new NotImplementedException();
 }
コード例 #3
0
ファイル: MyCaptain.cs プロジェクト: ardliath/Bottleships
 public void StartGameNotification(GameStartNotification gameStartNotification)
 {
 }
コード例 #4
0
 public void StartGameNotification(GameStartNotification gameStartNotification)
 {
     this.ShotHistory = new List <Shot>();
 }
コード例 #5
0
ファイル: Nelson.cs プロジェクト: ardliath/Bottleships
 public void StartGameNotification(GameStartNotification gameStartNotification)
 {
     this.ShotHistory = new List <Shot>();
     this.SearchShots = null;
     this.Finds       = null;
 }