public void TestHasEndDate() { Assert.IsNull(configuration.EndDateDelegate); configuration.HasEndDate(x => x.EndDate); Assert.IsNotNull(configuration.EndDateDelegate); var instance = new TestDocument(); instance.EndDate = DateTimeOffset.Now; Assert.AreEqual(instance.EndDate, configuration.EndDateDelegate(instance)); }