Ejemplo n.º 1
0
        public void TestGetStartDate()
        {
            var instance = new TestDocument();

            Assert.IsNull(configuration.GetStartDate(instance));

            configuration.HasStartDate(x => x.StartDate);
            Assert.IsNull(configuration.GetStartDate(instance));

            instance.StartDate = null;
            Assert.IsNull(configuration.GetStartDate(instance));

            var now = DateTimeOffset.Now;

            instance.StartDate = now;
            Assert.AreEqual(now, configuration.GetStartDate(instance));
        }