public void TestNewCustomerIsAddedProperly() { var target = new ContactRepository(Constants.CONTACT_DATA_FILE); var contact = Contact.CreateNewContact(); bool eventArgIsValid = false; target.ContactAdded += (sender, e) => eventArgIsValid = (e.NewContact == contact); target.AddContact(contact); Assert.IsTrue(eventArgIsValid, "Invalid NewContact property"); Assert.IsTrue(target.ContainsContact(contact), "New contact was not added"); }