Exemplo n.º 1
0
 public void AssertThatCanAddANewPerson()
 {
     using (PersonServiceClient client = new PersonServiceClient())
     {
         client.Open();
         Person person = new Person {
             FirstName = "Raffaele", LastName = "Garofalo"
         };
         client.AddPerson(person);
         bool result = client.HasPerson(person);
         Assert.IsTrue(result);
     }
 }
Exemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            button2.Enabled = false;
            PersonServiceClient client    = new PersonServiceClient();
            PersonDTO           personDto = new PersonDTO
            {
                CustomerId    = 10,
                ShobehCode    = 1,
                Firstname     = "ali",
                Lastname      = "ahmadi",
                MelliIdentity = "70",
                HomeAddress   = "babol",
                HomeTelno     = "12435",
            };

            client.AddPerson(personDto);
            button2.Enabled = true;
        }
 public void AddPerson(Person newPerson)
 {
     proxy.AddPerson(newPerson);
 }
 //stubs
 public void AddPerson(Person newPerson)
 {
     serviceProxy.AddPerson(newPerson);
 }
 public void AddItem(Person newItem)
 {
     proxy.AddPerson(newItem);
 }