コード例 #1
0
        public void When_start_the_game_I_see_4_foundations()
        {
            // Arrange
            var game = new Game();

            // Act

            // Assert
            Assert.AreEqual(4, game.Foundations.Count);
        }
コード例 #2
0
        public void When_start_the_game_I_see_7_piles_of_cards()
        {
            // Arrange
            var game = new Game();

            // Act

            // Assert
            Assert.AreEqual(7, game.Piles.Count);
        }
コード例 #3
0
        public void When_start_the_game_first_card_in_Nth_pile_is_upturned(int n)
        {
            // Arrange
            var game = new Game();

            // Act

            // Assert
            Assert.IsTrue(game.Piles[n - 1][0].IsUpturned);
        }
コード例 #4
0
        public void When_start_the_game_all_cards_in_the_reminder_are_downturned()
        {
            // Arrange
            var game = new Game();

            // Act

            // Assert
            Assert.IsTrue(game.Reminder.All(card => !card.IsUpturned));
        }
コード例 #5
0
        public void When_start_the_game_all_cards_apart_from_the_first_card_in_Nth_pile_are_downturned(int n)
        {
            // Arrange
            var game = new Game();

            // Act

            // Assert
            var cards = game.Piles[n - 1];
            Assert.IsTrue(cards.Skip(1).All(card => !card.IsUpturned));
        }
コード例 #6
0
        public void When_start_the_game_Nth_foundation_is_empty(int n)
        {
            // Arrange
            var game = new Game();

            // Act

            // Assert
            Assert.AreEqual(0, game.Foundations[n - 1].Count);
        }
コード例 #7
0
        public void When_start_the_game_remainder_contains_all_cards_which_are_not_in_piles()
        {
            // Arrange
            var game = new Game();
            int remainderCountExpected = 52 - 28;

            // Act

            // Assert
            Assert.AreEqual(remainderCountExpected, game.Reminder.Count);
        }
コード例 #8
0
        public void When_start_the_game_Nth_pile_contains_N_cards(int n)
        {
            // Arrange
            var game = new Game();

            // Act

            // Assert
            Assert.AreEqual(n, game.Piles[n - 1].Count);
        }