public async Task FireCannon_BadRequest_2()
        {
            var p2pSvc = new Mock <IPeerToPeerGameService>();

            var controller = new PeerToPeerGameController(p2pSvc.Object, _mapper, _signalRHub.Object, _logger.Object);

            var output = await controller.FireCannon(new P2PFireCannonDto()
            {
                Code = "12345", ConnectionId = null
            });

            _signalRHub.VerifyGet(p => p.Clients, Times.Never);

            Assert.AreEqual(output.GetType(), typeof(BadRequestResult));
        }
        public async Task FireCannon_BadRequest_3()
        {
            var p2pSvc = new Mock <IPeerToPeerGameService>();

            p2pSvc.Setup(x => x.FindActiveSessionAsync(It.IsAny <string>(), It.IsAny <string>()))
            .ReturnsAsync((PeerToPeerSessionState)null);

            var controller = new PeerToPeerGameController(p2pSvc.Object, _mapper, _signalRHub.Object, _logger.Object);

            var output = await controller.FireCannon(new P2PFireCannonDto()
            {
                Code = "12345", ConnectionId = "c1"
            });

            _signalRHub.VerifyGet(p => p.Clients, Times.Never);

            Assert.AreEqual(output.GetType(), typeof(BadRequestResult));
        }
        public async Task FireCannon_Ok()
        {
            P2PFireCannonDto dto = new P2PFireCannonDto()
            {
                Code = "12345", ConnectionId = "c2", CellId = 1
            };

            var p2pSvc = new Mock <IPeerToPeerGameService>();

            p2pSvc.Setup(x => x.FindActiveSessionAsync(It.IsAny <string>(), It.IsAny <string>()))
            .ReturnsAsync(new PeerToPeerSessionState()
            {
                Code = "12345", HostConnectionId = "c1",
            });

            var controller = new PeerToPeerGameController(p2pSvc.Object, _mapper, _signalRHub.Object, _logger.Object);

            var output = await controller.FireCannon(dto);

            _signalRHub.VerifyGet(p => p.Clients, Times.Once);

            Assert.AreEqual(output.GetType(), typeof(OkObjectResult));
        }