Esempio n. 1
0
        public void ShouldReturnTrueForRightGuess()
        {
            var mockRandom = Substitute.For<IRandom>();
            var guessANumber = new GuessANumber(mockRandom);
            var expected = 6;
            mockRandom.Range(Arg.Any<int>(), Arg.Any<int>()).Returns(expected);
            guessANumber.Roll();

            Assert.True(guessANumber.MakeGuess(expected));
        }
Esempio n. 2
0
        public void ShouldReturnTrueForRightGuess()
        {
            var mockRandom   = Substitute.For <IRandom>();
            var guessANumber = new GuessANumber(mockRandom);
            var expected     = 6;

            mockRandom.Range(Arg.Any <int>(), Arg.Any <int>()).Returns(expected);
            guessANumber.Roll();

            Assert.True(guessANumber.MakeGuess(expected));
        }