コード例 #1
0
        public void IsEmpty_FullStack_IsFalse()
        {
            TableauStack tableau = Setup();

            bool isEmpty = tableau.IsEmpty();

            Assert.IsFalse(isEmpty);
        }
コード例 #2
0
        public void PopTopCard_TakeTopCard_IsFaceUpCard()
        {
            TableauStack tableau = Setup();

            Card card = tableau.PopTopCard();

            Assert.IsTrue(card.IsFaceUp);
        }
コード例 #3
0
        public void PopTopCard_EmptyStack_IsNull()
        {
            TableauStack tableau = new TableauStack(new List <Models.Card>());

            Card card = tableau.PopTopCard();

            Assert.IsNull(card);
        }
コード例 #4
0
        public void IsEmpty_EmptyStack_IsTrue()
        {
            TableauStack tableau = new TableauStack(new List <Models.Card>());

            bool isEmpty = tableau.IsEmpty();

            Assert.IsTrue(isEmpty);
        }
コード例 #5
0
        public void PopTopCard_TakeTopCard_IsFiveClubs()
        {
            TableauStack tableau = Setup();

            Card card = tableau.PopTopCard();

            Assert.AreEqual(Enums.Values.Five, card.Value);
            Assert.AreEqual(Enums.Suits.Clubs, card.Suit);
        }
コード例 #6
0
        public void ViewTopCard_ViewFirstCard_IsFiveClubs()
        {
            TableauStack tableau = Setup();

            Card card = tableau.ViewTopCard();

            Assert.AreEqual(Enums.Values.Five, card.Value);
            Assert.AreEqual(Enums.Suits.Clubs, card.Suit);
        }
コード例 #7
0
        public void PopTopCard_TakeSecondCard_IsQueenSpades()
        {
            TableauStack tableau = Setup();

            tableau.PopTopCard();
            Card card = tableau.PopTopCard();

            Assert.AreEqual(Enums.Values.Queen, card.Value);
            Assert.AreEqual(Enums.Suits.Spades, card.Suit);
        }
コード例 #8
0
        public void PopTopCard_TakeFourthCard_IsFaceUp()
        {
            TableauStack tableau = Setup();

            tableau.PopTopCard();
            tableau.PopTopCard();
            tableau.PopTopCard();
            Card card = tableau.PopTopCard();

            Assert.IsFalse(card.IsFaceUp);
        }
コード例 #9
0
        public void PopTopCard_TakeFourthCard_IsSixHearts()
        {
            TableauStack tableau = Setup();

            tableau.PopTopCard();
            tableau.PopTopCard();
            tableau.PopTopCard();
            Card card = tableau.PopTopCard();

            Assert.AreEqual(Enums.Values.Six, card.Value);
            Assert.AreEqual(Enums.Suits.Hearts, card.Suit);
        }
コード例 #10
0
        public void ViewTopCard_ViewFifthCard_IsFaceDown()
        {
            TableauStack tableau = Setup();

            tableau.PopTopCard();
            tableau.PopTopCard();
            tableau.PopTopCard();
            tableau.PopTopCard();
            Card card = tableau.ViewTopCard();

            Assert.IsFalse(card.IsFaceUp);
        }
コード例 #11
0
        public void ViewTopCard_ViewSixthCard_IsNull()
        {
            TableauStack tableau = Setup();

            tableau.PopTopCard();
            tableau.PopTopCard();
            tableau.PopTopCard();
            tableau.PopTopCard();
            tableau.PopTopCard();
            Card card = tableau.ViewTopCard();

            Assert.IsNull(card);
        }
コード例 #12
0
        public void ViewTopCard_ViewFifthCard_IsEightHearts()
        {
            TableauStack tableau = Setup();

            tableau.PopTopCard();
            tableau.PopTopCard();
            tableau.PopTopCard();
            tableau.PopTopCard();
            Card card = tableau.ViewTopCard();

            Assert.AreEqual(Enums.Values.Eight, card.Value);
            Assert.AreEqual(Enums.Suits.Hearts, card.Suit);
        }