Beispiel #1
0
        public void ShouldReturnFizzForMultipleOfThree()
        {
            //arrange
            IFizzBuzz       fizzBuzz       = new FizzBuzz();
            IFizzBuzzNumber inputNumber    = new FizzBuzzNumber(3);
            IFizzBuzzResult expectedResult = new FizzResult();
            //act
            IFizzBuzzResult actualResult = fizzBuzz.Calculate(inputNumber);

            //assert
            actualResult.Equals(expectedResult).Should().BeTrue();
        }
Beispiel #2
0
        public void ShouldReturnString1ForNumber1()
        {
            //arrange
            IFizzBuzz       fizzBuzz       = new FizzBuzz();
            IFizzBuzzNumber inputNumber    = new FizzBuzzNumber(1);
            IFizzBuzzNumber expectedNumber = new FizzBuzzNumber(1);
            IFizzBuzzResult expectedResult = new NumberResult(expectedNumber);
            //act
            IFizzBuzzResult actualResultNumber = fizzBuzz.Calculate(inputNumber);

            //assert
            actualResultNumber.Equals(expectedResult).Should().BeTrue();
        }