Example #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();
        }
Example #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();
        }
Example #3
0
 public HomeController(IFizzBuzzResult fizzBuzzResult)
 {
     this._fizzBuzzResult = fizzBuzzResult;
 }