示例#1
0
        public ActionResult NewDeck(DeckType id)
        {
            IDeck model;

            switch (id)
            {
            case (DeckType.MultipleDecks):
                model = new MultipleDecks(5);
                break;

            case (DeckType.Spanish21):
                model = new Spanish21Deck();
                break;

            default:
                model = new Deck();
                break;
            }

            Session["Deck"] = model;
            return(PartialView("_Deck", model));
        }
示例#2
0
        public void ShouldNotHaveAnyTen()
        {
            var objectUnderTest = new Spanish21Deck();

            Assert.That(objectUnderTest.Cards.FindAll(c => c.Id == 10).Count, Is.EqualTo(0));
        }
示例#3
0
        public void ShouldHave48Cards()
        {
            var objectUnderTest = new Spanish21Deck();

            Assert.That(objectUnderTest.Cards.Count, Is.EqualTo(48), "Spanish21 should have 48 cards");
        }