예제 #1
0
        public void AssertThatTheServiceCanRun()
        {
            PersonServiceClient client = new PersonServiceClient();

            client.Open();
            Assert.IsNotNull(client);
            Assert.IsTrue(client.State == CommunicationState.Opened);
            client.Close();
            Assert.IsTrue(client.State == CommunicationState.Closed);
        }
예제 #2
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);
     }
 }