コード例 #1
0
        public void CalculateTest(double firstValue, double expected)
        {
            var calculator   = new NaturalLogarithmCalculator();
            var actualResult = calculator.Calculate(firstValue);

            Assert.AreEqual(expected, actualResult, 0.0001);
        }
コード例 #2
0
        public void CathExceptions()
        {
            var calculator = new NaturalLogarithmCalculator();

            Assert.Throws <Exception>(() => calculator.Calculate(0));
        }