public void CalculateBullsAndCows_ifGuessLengthIsSmallerThanNUMBER_OF_DIGITS_ShouldReturnFalse()
        {
            // Arrange
            BullsAndCows game = new BullsAndCows();
            int bulls = 0;
            int cows = 0;
            int[] secret = { 1, 1, 1, 1 };
            string guess = GetRandomNumberAsString(BullsAndCows.NUMBER_OF_DIGITS - 1);

            // Act
            bool isValidGuess = game.CalculateBullsAndCows(secret, guess, out bulls, out cows);

            // Assert
            Assert.IsFalse(isValidGuess);
        }
        public void CalculateBullsAndCows_ifGuessLengthEqualsToNUMBER_OF_DIGITSAndGuessNumberParseSucceed_ShouldReturnTrue()
        {
            // Arrange
            BullsAndCows game = new BullsAndCows();
            int bulls = 0;
            int cows = 0;
            int[] secret = { 1, 1, 1, 1 };
            string guess = GetRandomNumberAsString(BullsAndCows.NUMBER_OF_DIGITS);

            // Act
            bool isValidGuess = game.CalculateBullsAndCows(secret, guess, out bulls, out cows);

            // Assert
            Assert.IsTrue(isValidGuess);
        }
        public void CalculateBullsAndCows_IfGuessNumberParseFails_ShouldReturnFalse()
        {
            // Arrange
            BullsAndCows game = new BullsAndCows();
            int bulls = 0;
            int cows = 0;
            int[] secret = { 1, 1, 1, 1 };
            string[] guesses = { "G123", "1G34", "12G4", "123G" };

            for (int i = 0; i < guesses.Length; i++)
            {
                string guess = guesses[i];
                bool isValidGuess = game.CalculateBullsAndCows(secret, guess, out bulls, out cows);
                Assert.IsFalse(isValidGuess);
            }
        }
        public void CalculateBullsAndCows_Secret5694Guess5555_1Bull0Cow()
        {
            // Arrange
            BullsAndCows game = new BullsAndCows();
            int bulls = 0;
            int cows = 0;
            int[] secret = { 5, 6, 9, 4 };
            string guess = "5555";

            // Act
            game.CalculateBullsAndCows(secret, guess, out bulls, out cows);

            // Assert
            Assert.AreEqual(1, bulls);
            Assert.AreEqual(0, cows);
        }
        public void CalculateBullsAndCows_Secret4440Guess1234_0Bull1Cow()
        {
            // Arrange
            BullsAndCows game = new BullsAndCows();
            int bulls = 0;
            int cows = 0;
            int[] secret = { 4, 4, 4, 0 };
            string guess = "1234";

            // Act
            game.CalculateBullsAndCows(secret, guess, out bulls, out cows);

            // Assert
            Assert.AreEqual(0, bulls);
            Assert.AreEqual(1, cows);
        }
        public void CalculateBullsAndCows_Secret2424Guess4144_1Bull1Cow()
        {
            // Arrange
            BullsAndCows game = new BullsAndCows();
            int bulls = 0;
            int cows = 0;
            int[] secret = { 2, 4, 2, 4 };
            string guess = "4144";

            // Act
            game.CalculateBullsAndCows(secret, guess, out bulls, out cows);

            // Assert
            Assert.AreEqual(1, bulls);
            Assert.AreEqual(1, cows);
        }
        public void CalculateBullsAndCows_Secret1234Guess5678_0Bull0Cow()
        {
            // Arrange
            BullsAndCows game = new BullsAndCows();
            int bulls = 0;
            int cows = 0;
            int[] secret = { 1, 2, 3, 4 };
            string guess = "5678";

            // Act
            game.CalculateBullsAndCows(secret, guess, out bulls, out cows);

            // Assert
            Assert.AreEqual(0, bulls);
            Assert.AreEqual(0, cows);
        }
        public void CalculateBullsAndCows_Secret1234Guess1923_1Bull2Cow()
        {
            // Arrange
            BullsAndCows game = new BullsAndCows();
            int bulls = 0;
            int cows = 0;
            int[] secret = { 1, 2, 3, 4 };
            string guess = "1923";

            // Act
            game.CalculateBullsAndCows(secret, guess, out bulls, out cows);

            // Assert
            Assert.AreEqual(1, bulls);
            Assert.AreEqual(2, cows);
        }
        public void CalculateBullsAndCows_Secret0987Guess0987_ShouldNeverReturn3Bull1Cow()
        {
            // Arrange
            BullsAndCows game = new BullsAndCows();
            int bulls = 0;
            int cows = 0;
            int[] secret = { 0, 9, 8, 7 };
            string guess = "0987";

            // Act
            game.CalculateBullsAndCows(secret, guess, out bulls, out cows);

            // Assert
            Assert.IsFalse(bulls == 3 && cows == 1);
        }