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); }
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); } }