public void TestHasAddresses() { Assert.IsNull(configuration.AddressesDelegate); configuration.HasAddresses(x => x.Addresses); Assert.IsNotNull(configuration.AddressesDelegate); var instance = new TestDocument(); instance.Addresses = new string[] { "value1", "value2" }; Assert.IsTrue(Object.ReferenceEquals(instance.Addresses, configuration.AddressesDelegate(instance))); }