Example #1
0
        public void LogXYTest(double firstValue, double secondValue, double expected)
        {
            var calculator   = new LogXY();
            var actualResult = calculator.Calculate(firstValue, secondValue);

            Assert.AreEqual(expected, actualResult);
        }
Example #2
0
        public void CalculationTest(double value, double value2, double answer)
        {
            var    calculator = new LogXY();
            double actual     = calculator.calculate(value, value2);

            Assert.AreEqual(answer, actual, 0.001);
        }
Example #3
0
        public void CalculatorTest()
        {
            var calculator = new LogXY();

            Assert.Throws <Exception>(() => calculator.Calculate(-5, -1));
        }
Example #4
0
        public void NegativeLogXYTest()
        {
            var calculator = new LogXY();

            Assert.Throws <Exception>(() => calculator.calculate(0, -1));
        }
Example #5
0
        public void CalculationError()
        {
            var calculator = new LogXY();

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