コード例 #1
0
        public void Test_DateTimeStringPropRule_ShouldSetValue()
        {
            //---------------Set up test pack-------------------
            const string startDateValue = "Today";
            const string endDateValue   = "Tomorrow";
            //---------------Assert Precondition----------------

            //---------------Execute Test ----------------------
            var attribute = new AutoMapDateTimePropRuleAttribute(startDateValue, endDateValue);

            //---------------Test Result -----------------------
            Assert.IsInstanceOf <Attribute>(attribute);
            Assert.AreEqual(startDateValue, attribute.StartDateString);
            Assert.AreEqual(endDateValue, attribute.EndDateString);
        }
コード例 #2
0
        public void Test_DateTimePropRule_ShouldSetValue()
        {
            //---------------Set up test pack-------------------
            var startDateValue = DateTime.Now;
            var endDateValue   = DateTime.Now.AddDays(10);
            //---------------Assert Precondition----------------

            //---------------Execute Test ----------------------
            var attribute = new AutoMapDateTimePropRuleAttribute(startDateValue, endDateValue);

            //---------------Test Result -----------------------
            Assert.IsInstanceOf <Attribute>(attribute);
            Assert.AreEqual(startDateValue, attribute.StartDate);
            Assert.AreEqual(endDateValue, attribute.EndDate);
        }
コード例 #3
0
        public void Test_DateTimeStringPropRule_ShouldSetValue()
        {
            //---------------Set up test pack-------------------
            const string startDateValue = "Today";
            const string endDateValue = "Tomorrow";
            //---------------Assert Precondition----------------

            //---------------Execute Test ----------------------
            var attribute = new AutoMapDateTimePropRuleAttribute(startDateValue, endDateValue);
            //---------------Test Result -----------------------
            Assert.IsInstanceOf<Attribute>(attribute);
            Assert.AreEqual(startDateValue, attribute.StartDateString);
            Assert.AreEqual(endDateValue, attribute.EndDateString);
        }
コード例 #4
0
        public void Test_DateTimePropRule_ShouldSetValue()
        {
            //---------------Set up test pack-------------------
            var startDateValue = DateTime.Now;
            var endDateValue = DateTime.Now.AddDays(10);
            //---------------Assert Precondition----------------

            //---------------Execute Test ----------------------
            var attribute = new AutoMapDateTimePropRuleAttribute(startDateValue, endDateValue);
            //---------------Test Result -----------------------
            Assert.IsInstanceOf<Attribute>(attribute);
            Assert.AreEqual(startDateValue, attribute.StartDate);
            Assert.AreEqual(endDateValue, attribute.EndDate);
        }