예제 #1
0
        public void CalculateTest(double first, double expected)
        {
            var calculator   = new Logarithm10();
            var actualResult = calculator.Calculate(first);

            Assert.AreEqual(expected, actualResult, 0.0001);
        }
예제 #2
0
        public void ErrorTest()
        {
            var calculator = new Logarithm10();

            Assert.Throws <Exception>(() => calculator.Calculate(-2));
        }
예제 #3
0
        public void NegativeCalculateTest()
        {
            var calculator = new Logarithm10();

            Assert.Throws <System.Exception>(() => calculator.Calculate(-4));
        }