Esempio n. 1
0
        public void DivTest(int num1, int num2,
                            int expectedResult)
        {
            var result = StaticCalculator.Div(num1, num2);

            Assert.AreEqual(expectedResult, result);
        }
        public void DivideIsNegativeInfinity(double a, double b)
        {
            var actual   = StaticCalculator.divide(a, b);
            var response = double.IsNegativeInfinity(a / b) ? "true" : "false";

            if (response.Equals("true"))
            {
                Assert.Pass();
            }
        }
        public void ModulusIsCorrect(int a, int b, int expected)
        {
            var actual = StaticCalculator.modulus(a, b);

            Assert.AreEqual(expected, actual);
        }
        public void DivideIsCorrect(int a, int b, int expected)
        {
            var actual = StaticCalculator.divide(a, b);

            Assert.AreEqual(expected, actual);
        }
        public void MultiplyIsCorrect(int a, int b, int expected)
        {
            var actual = StaticCalculator.multiply(a, b);

            Assert.AreEqual(expected, actual);
        }
        public void SubtractIsCorrect(int a, int b, int expected)
        {
            var actual = StaticCalculator.subtract(a, b);

            Assert.AreEqual(expected, actual);
        }