Exemplo n.º 1
0
        public void CalculatorTest(
            double firstValue,
            double expected)
        {
            var calculator   = new Log10();
            var actualResult = calculator.Calculate(firstValue);

            Assert.Throws <Exception>(() => calculator.Calculate(-5));
            Assert.AreEqual(expected, actualResult);
        }
Exemplo n.º 2
0
        public void Calculate()
        {
            Log10  calculator = new Log10();
            double result     = calculator.Calculate(1);

            Assert.AreEqual(0, result, 0.001);
        }
Exemplo n.º 3
0
        public void CalculateTest(double firstValue, double expected)
        {
            var calculator   = new Log10();
            var actualResult = calculator.Calculate(firstValue);

            Assert.AreEqual(expected, actualResult, 0.0001);
        }
Exemplo n.º 4
0
        public void CalculateReverseTestStrong(double firstValue, double expected)
        {
            IOneArgumentCalculator calculator = new Log10();
            double result = calculator.Calculate(firstValue);

            Assert.AreEqual(expected, result);
        }
Exemplo n.º 5
0
        public void ExceptionTest()
        {
            var calculator = new Log10();

            Assert.Throws <Exception>(() => calculator.Calculate(0));
        }
Exemplo n.º 6
0
        public void ExceptionLessThanZeroTest(double firstArgument)
        {
            var calculator = new Log10();

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