Example #1
0
        public void TestMethodSumPlus()
        {
            CalculatorBC.Calculator calculator = new CalculatorBC.Calculator();

            calculator.add(2);
            calculator.add(2);

            Assert.AreEqual(calculator.GetResult(), 4);
        }
Example #2
0
        private void addButton_Click(object sender, EventArgs e)
        {
            var number = long.Parse(tbx_Number.Text);

            calculatorProcessor.add(number);
            tbx_Result.Text = calculatorProcessor.GetResult().ToString();
        }
Example #3
0
        public void TestMethodDivideMinus()
        {
            CalculatorBC.Calculator calculator = new CalculatorBC.Calculator();

            calculator.add(2);
            calculator.divide(2);

            Assert.AreNotEqual(calculator.GetResult(), 2);
        }