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); }
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); }
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); }
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); }