コード例 #1
0
        public void When_Numbers_Are_Close_Then_AreClose_Should_Return_True(
            double doubleNumber1,
            double doubleNumber2,
            double doubleTolerance,
            bool numberAreCloseExpectation)
        {
            // Arrange
            var number1   = _calculator.FromDouble(doubleNumber1);
            var number2   = _calculator.FromDouble(doubleNumber2);
            var tolerance = _calculator.FromDouble(doubleTolerance);

            // Act
            var number1IsCloseToNumber2 = _calculator.AreClose(number1, number2, tolerance);

            // Assert
            number1IsCloseToNumber2.Should().Be(numberAreCloseExpectation);
        }