public void BasicHandsRetrieval() { JsonResult result = testController.GeneratedCardHands(4, 10) as JsonResult; CardHandsViewModel viewModel = shucker.Shuck <CardHandsViewModel>(result); Assert.IsNotNull(viewModel, "Generated view model was null."); List <List <Card> > dealtHands = viewModel.RequestedHands; Assert.IsNotNull(dealtHands, "Hands not dealt correctly."); Assert.AreEqual(4, dealtHands.Count, "Incorrect number of hands generated."); Assert.AreEqual(10, dealtHands[2].Count, "Incorrect number of cards in dealth hand."); }
public void BasicEval() { ViewResult result = testController.PokerEvaluation(testForm) as ViewResult; Assert.IsNotNull( result, "Result was either null or of the incorrect type."); PokerEvaluationViewModel viewModel = shucker.Shuck <PokerEvaluationViewModel>(result); Assert.IsTrue( viewModel != null && viewModel.Verdict != null && viewModel.TiedHands.Count == 2, "Contained view model was null, of the wrong type or had the incorrect data."); }