コード例 #1
0
        public void Get_Returns_1_for_1()
        {
            var fizzBuzz = new FizzBuzz();
            var result   = fizzBuzz.Get(1);

            Assert.Equal("1", result);
        }
コード例 #2
0
        public void Get_Returns_Buzz_for_5()
        {
            var fizzBuzz = new FizzBuzz();
            var result   = fizzBuzz.Get(5);

            Assert.Equal("Buzz", result);
        }
コード例 #3
0
        public void Get_Returns_FizzBuzz_for_30()
        {
            var fizzBuzz = new FizzBuzz();
            var result   = fizzBuzz.Get(30);

            Assert.Equal("FizzBuzz", result);
        }
コード例 #4
0
        public void Get_Return_For_15()
        {
            var fizzBuzz = new FizzBuzz();
            var result   = fizzBuzz.Get(15);

            Assert.Equal("FizzBuzz", result);
        }
コード例 #5
0
        public void Get_Returns_2_for_2()
        {
            var fizzBuzz = new FizzBuzz();
            var result   = fizzBuzz.Get(2);

            Assert.Equal("2", result);
        }
コード例 #6
0
        public void Get_Returns_Buzz_for_5()
        {
            var fizzBuzz = new FizzBuzz(); //Arrange - Get ready

            var result = fizzBuzz.Get(5);  //Act - Do the thing you're testing

            Assert.Equal("Buzz", result);  //Assert - Make sure it worked
        }
コード例 #7
0
        [Fact]                                          //It's a good practice to use blank lines to separate the three phases of each test.
        public void Get_Returns_Buzz_for_5()
        {
            var fizzBuzz = new FizzBuzz();            //arrange - get ready.

            var result = fizzBuzz.Get(5);             //act - do the thing you're testing

            Assert.Equal("Buzz", result);             // assert - make sure it worked.
        }
コード例 #8
0
        public void Test1() //Get returns 3 for fizz?
        {
            //Arrange
            var fizzBuzz = new MyNumber();

            //Act
            var resultt = FizzBuzz.Get(3);

            //Assert
            Assert.Equals("3", result);
        }
コード例 #9
0
        public void Get_Returns_1_for_1()
        {
            // Arrange
            var fizzBuzz = new FizzBuzz();

            // Act
            var result = fizzBuzz.Get(1);

            // Assert
            Assert.Equal("1", result);
        }
コード例 #10
0
        public void Get_Returns_FizzBuzz_for_15()
        {
            // arrange
            var fizzBuzz = new FizzBuzz();

            // act
            var result = fizzBuzz.Get(15);

            // assert
            Assert.Equal("FizzBuzz", result);
        }