示例#1
0
        private TestCaseData OneDividedByZero()
        {
            var calculatorTCD = new CalculatorTestCaseData
            {
                FirstNumber  = 1,
                SecondNumber = 0
            };

            return(TestCaseDataFactory.Get(calculatorTCD));
        }
示例#2
0
        private TestCaseData TwoDividedByOne()
        {
            var calculatorTCD = new CalculatorTestCaseData
            {
                FirstNumber    = 2,
                SecondNumber   = 1,
                ExpectedResult = 2
            };

            return(TestCaseDataFactory.Get(calculatorTCD));
        }
        public void CalculatorTestMethod(CalculatorTestCaseData testCase)
        {
            int result = _calculator.Divide(testCase.FirstNumber, testCase.SecondNumber);

            Assert.AreEqual(testCase.ExpectedResult, result);
        }