Beispiel #1
0
        public void Determine_the_number_spoken_at_specific_turn(
            string startingNumbers,
            int expectedTurn,
            int expectedSpokenNumber)
        {
            // Given
            var memoryGame    = new MemoryGame(startingNumbers);
            var expectedState = new MemoryGameState(expectedTurn, expectedSpokenNumber);

            // When
            memoryGame.PlayUpToTurn(expectedTurn);
            var actualState = memoryGame.State;

            // Then
            Assert.Equal(expectedState, actualState);
        }
Beispiel #2
0
        public void Play_until_specific_turn(
            string startingNumbers,
            int expectedTurn,
            int expectedNumberSpoken)
        {
            // Given
            var memoryGame    = new MemoryGame(startingNumbers);
            var expectedState = new MemoryGameState(expectedTurn, expectedNumberSpoken);

            // When
            memoryGame.PlayUpToTurn(expectedTurn);
            var actualState = memoryGame.State;

            // Then
            Assert.Equal(expectedState, actualState);
        }