private Models.Messages.DealResponse NewDeal(Guid handId) { var hand = HandRepo.Find(handId); if (hand != null) { var response = new Models.Messages.DealResponse() { Deck = hand.Deck }; return(response); } else { throw new ArgumentException(); } }
public void Should_Deal_Cards_Heads_Up() { Guid tableId = new Guid("bf368921-346a-42d8-9cb8-621f9cad5e16"); _controller = new MessageController(); _controller.HandRepo = new Repository.MockHandRepo(); request.Method = "Deal"; request.Params = new Models.Messages.DealRequest() { TableId = tableId }; var response = _controller.Post(request); Assert.IsNotNull(response); Assert.AreEqual(REQUEST_ID, response.Id.ToString()); Assert.IsNotNull(response.Result); //Assert.IsNotNull(response.Result); Models.Messages.DealResponse dealResponse = response.Result as Models.Messages.DealResponse; Assert.AreEqual(52, dealResponse.Deck.Cards.Count); }