コード例 #1
0
        public void Given_The_Hundredth_Result_I_Should_See_Buzz()
        {
            // Arrange
            var fizzBuzzLogic = new FizzBuzzLogic();

            // Act
            var result = fizzBuzzLogic.Get();

            // Assert
            Assert.AreEqual("Buzz", result[99]);
        }
コード例 #2
0
        public void Given_The_Second_Result_I_Should_See_2()
        {
            // Arrange
            var fizzBuzzLogic = new FizzBuzzLogic();

            // Act
            var result = fizzBuzzLogic.Get();

            // Assert
            Assert.AreEqual("2", result[1]);
        }
コード例 #3
0
        public void Given_The_Sixtieth_Result_I_Should_See_FizzBuzz()
        {
            // Arrange
            var fizzBuzzLogic = new FizzBuzzLogic();

            // Act
            var result = fizzBuzzLogic.Get();

            // Assert
            Assert.AreEqual("FizzBuzz", result[59]);
        }
コード例 #4
0
        public void Given_The_First_Result_I_Should_See_1()
        {
            // Arrange
            var fizzBuzzLogic = new FizzBuzzLogic();        //start an instance of a class

            // Act
            var result = fizzBuzzLogic.Get();               //function attached to a class instance

            // Assert
            Assert.AreEqual("1", result[0]);    //state what it is expected to happen
        }