public void TestHasPhoneNumbers() { Assert.IsNull(configuration.PhoneNumbersDelegate); configuration.HasPhoneNumbers(x => x.PhoneNumbers); Assert.IsNotNull(configuration.PhoneNumbersDelegate); var instance = new TestDocument(); instance.PhoneNumbers = new string[] { "value1", "value2" }; Assert.IsTrue(Object.ReferenceEquals(instance.PhoneNumbers, configuration.PhoneNumbersDelegate(instance))); }