Пример #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);
        }