Esempio n. 1
0
        public void AddTest()
        {
            //arr
            double expected = 72;
            //act
            double actual = s.Add(64, 8);

            //assert
            Assert.AreEqual(expected, actual);
        }
        public static int Main(string[] args)
        {
            // Work with the web service.
            Service1 w = new Service1();

            Console.WriteLine("100 + 100 is {0}",
                              w.Add(100, 100));
            try
            {
                w.Divide(0, 0);
            }
            catch (DivideByZeroException e)
            {
                Console.WriteLine(e.Message);
            }
            return(0);
        }
Esempio n. 3
0
 /// <summary>
 /// Name:BtnAdd_Click
 /// Description:Add Two Values And Result Display in Label.
 /// Author:Monal shah
 /// Created Date:2010/12/2
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void BtnAdd_Click(object sender, EventArgs e)
 {
     LblDisplayAnswer.Text = Convert.ToString(objWebService.Add(Convert.ToInt32(TxtValue1.Text), Convert.ToInt32(TxtValue2.Text)));
 }
Esempio n. 4
0
 public void AddTest()
 {
     Assert.AreEqual(10, client.Add(5, 5));
 }
Esempio n. 5
0
 public void AddTest()
 {
     Assert.AreEqual(7, service.Add(2, 5));
 }
        public void Add()
        {
            Service1 add = new Service1();

            Assert.AreEqual(3, add.Add(1, 2));
        }
Esempio n. 7
0
 public void AddResult()
 {
     unitTest.Add(2, 3);
     Assert.AreEqual(5, unitTest.Result);
 }