public void CalculateTest(double firstArgument, double expectedResult)
        {
            var calculator   = new LnCalculator();
            var actualResult = calculator.Calculate(firstArgument);

            Assert.AreEqual(expectedResult, actualResult, 0.001);
        }
Beispiel #2
0
        void CalcLogTests(double testnum)
        {
            LnCalculator logc = new LnCalculator();
            double       expResult = Math.Log(testnum), actResult = logc.Calculate(testnum);

            Assert.AreEqual(expResult, actResult);
        }
Beispiel #3
0
        public void CalculateTest(double firstValue, double expected)
        {
            var calculator = new LnCalculator();
            var result     = calculator.Calculate(firstValue);

            Assert.AreEqual(expected, result, 0.0001);
        }
        public void CalculationTest(double firstValue, double expected)
        {
            var calculator   = new LnCalculator();
            var actualResult = calculator.Calculate(firstValue);

            Assert.AreEqual(expected, actualResult, 0.1);
        }
        public void ExceptionTest()
        {
            var calculator = new LnCalculator();

            Assert.Throws <Exception>(() => calculator.Calculate(-10));
        }
Beispiel #6
0
        public void ExceptionByNegativValueTest()
        {
            var calculator = new LnCalculator();

            Assert.Throws <Exception>(() => calculator.Calculate(-1));
        }
        public void CalculationError()
        {
            var calculator = new LnCalculator();

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