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); }
/// <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))); }
public void AddTest() { Assert.AreEqual(10, client.Add(5, 5)); }
public void AddTest() { Assert.AreEqual(7, service.Add(2, 5)); }
public void Add() { Service1 add = new Service1(); Assert.AreEqual(3, add.Add(1, 2)); }
public void AddResult() { unitTest.Add(2, 3); Assert.AreEqual(5, unitTest.Result); }