Esempio n. 1
0
        public void LogxyCalculator()

        {
            LogxyCalculator calculator = new LogxyCalculator();

            Assert.Throws <Exception>(() => calculator.Calculate(1, 0));
        }
Esempio n. 2
0
        public void CalculateTest(double firstValue, double secondValue, double expected)
        {
            var calculator   = new LogxyCalculator();
            var actualResult = calculator.Calculate(firstValue, secondValue);

            Assert.AreEqual(expected, actualResult);
        }
Esempio n. 3
0
        public void LogxyCalculator()

        {
            LogxyCalculator calculator = new LogxyCalculator();
            double          actual     = calculator.Calculate(4, 2);

            Assert.AreEqual(2, actual);
        }
Esempio n. 4
0
        public void LogxyCalculator(
            double firstValue,
            double secondValue,
            double expected)

        {
            LogxyCalculator calculator = new LogxyCalculator();
            double          actual     = calculator.Calculate(firstValue, secondValue);

            Assert.AreEqual(expected, actual);
        }
Esempio n. 5
0
        public void ExceptionByBaseValueTest()
        {
            var calculator = new LogxyCalculator();

            Assert.Throws <Exception>(() => calculator.Calculate(1, 5));
        }
Esempio n. 6
0
        public void ExceptionByNegativValueTest()
        {
            var calculator = new LogxyCalculator();

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