Пример #1
0
        public void When_divising_by_zero_divide_throws_cannot_divide_by_zero_exception()
        {
            // arrange
            var math = new Mathematics();

            // act
            var result = math.Divide(25, 0);

            Assert.True(double.IsInfinity(result));
        }
Пример #2
0
        public void Method_divide_returns_division_of_given_values()
        {
            // arrange
            var math = new Mathematics();

            // act
            var result = math.Divide(25, 5);

            // assert
            Assert.Equal(5, result);
        }