public void TestAddPositive()
        {
            //Act - we need to provide some data to get an output
            var Actual = cal1.Add(first, second);

            //Assert - we need to check the output we get is correct or not
            Assert.AreEqual(expected: "6", Actual);
        }
Beispiel #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     obj            = new Calulator();
     obj.num1       = Convert.ToInt32(textBox1.Text);
     obj.num2       = Convert.ToInt32(textBox1.Text);
     lblanswer.Text = "Addition is: " + obj.Add();
 }