public void TestGetEndDate() { var instance = new TestDocument(); Assert.IsNull(configuration.GetEndDate(instance)); configuration.HasEndDate(x => x.EndDate); Assert.IsNull(configuration.GetEndDate(instance)); instance.EndDate = null; Assert.IsNull(configuration.GetEndDate(instance)); var now = DateTimeOffset.Now; instance.EndDate = now; Assert.AreEqual(now, configuration.GetEndDate(instance)); }