コード例 #1
0
ファイル: Card_Test.cs プロジェクト: davidamoen/Blackjack_MVC
        public void CardValueTest()
        {
            Card c = new Card(Suit.Hearts, CardType.Deuce);
            Assert.AreEqual(2, c.HighValue);
            Assert.AreEqual(2, c.LowValue);

            c = new Card(Suit.Hearts, CardType.Seven);
            Assert.AreEqual(7, c.HighValue);
            Assert.AreEqual(7, c.LowValue);

            c = new Card(Suit.Hearts, CardType.Ten);
            Assert.AreEqual(10, c.HighValue);
            Assert.AreEqual(10, c.LowValue);

            c = new Card(Suit.Hearts, CardType.Queen);
            Assert.AreEqual(10, c.HighValue);
            Assert.AreEqual(10, c.LowValue);

            c = new Card(Suit.Hearts, CardType.King);
            Assert.AreEqual(10, c.HighValue);
            Assert.AreEqual(10, c.LowValue);

            c = new Card(Suit.Hearts, CardType.Ace);
            Assert.AreEqual(11, c.HighValue);
            Assert.AreEqual(1, c.LowValue);
        }
コード例 #2
0
ファイル: Card_Test.cs プロジェクト: davidamoen/Blackjack_MVC
        public void AceOfHearts()
        {
            Card c = new Card(Suit.Hearts, CardType.Ace);

            Assert.AreEqual(c.Suit, Suit.Hearts);

            Assert.AreEqual(c.CardType, CardType.Ace);
        }