示例#1
0
        public void Less_ValuesAreDates_CompareToCurrentDate_Val3EqualCurrentDate_ExpectFalse()
        {
            //Arrange
            LessModelOfDates model = new LessModelOfDates {
                Val3 = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day)
            };
            //Act
            bool isValid = model.PropertyIsValid("Val3");

            //Assert
            isValid.ShouldBeFalse();
        }
示例#2
0
        public void Less_ValuesAreDates_CompareToCurrentDate_Val3NotLessThanCurrentDate_ExpectFalse()
        {
            //Arrange
            LessModelOfDates model = new LessModelOfDates {
                Val3 = DateTime.Now.AddDays(1)
            };
            //Act
            bool isValid = model.PropertyIsValid("Val3");

            //Assert
            isValid.ShouldBeFalse();
        }
示例#3
0
        public void Less_ValuesAreDates_SpecificValue_Val1NotLessThanSpecificValue_ExpectFalse()
        {
            //Arrange
            LessModelOfDates model = new LessModelOfDates {
                Val1 = new DateTime(2090, 1, 1)
            };
            //Act
            bool isValid = model.PropertyIsValid("Val1");

            //Assert
            isValid.ShouldBeFalse();
        }
示例#4
0
        public void Less_ValuesAreDates_Val2NotLessThanVal2_ExpectFalse()
        {
            //Arrange
            LessModelOfDates model = new LessModelOfDates {
                Val1 = DateTime.Now, Val2 = DateTime.Now.AddDays(1)
            };
            //Act
            bool isValid = model.PropertyIsValid("Val2");

            //Assert
            isValid.ShouldBeFalse();
        }
示例#5
0
        public void Less_ValuesAreDates_Val1IsNotNullAndVal2IsNull_ExpectTrue()
        {
            //Arrange
            LessModelOfDates model = new LessModelOfDates {
                Val1 = DateTime.Now, Val2 = null
            };
            //Act
            bool isValid = model.PropertyIsValid("Val2");

            //Assert
            isValid.ShouldBeTrue();
        }
示例#6
0
        public void Less_ValuesAreDates_Val2LesssThanVal1_ExpectTrue()
        {
            //Arrange
            DateTime         date  = DateTime.Now.Date;
            LessModelOfDates model = new LessModelOfDates {
                Val1 = date, Val2 = date.AddDays(-1)
            };
            //Act
            bool isValid = model.PropertyIsValid("Val2");

            //Assert
            isValid.ShouldBeTrue();
        }
示例#7
0
        public void Less_ValuesAreDates_Val2EqualsVal1_ExpectFalse()
        {
            //Arrange
            DateTime         date  = DateTime.Now.Date;
            LessModelOfDates model = new LessModelOfDates {
                Val1 = date, Val2 = date
            };
            //Act
            bool isValid = model.PropertyIsValid("Val2");

            //Assert
            isValid.ShouldBeFalse();
        }
示例#8
0
 public void Less_ValuesAreDates_Val2NotLessThanVal2_ExpectFalse()
 {
     //Arrange
     LessModelOfDates model = new LessModelOfDates {Val1 = DateTime.Now, Val2 = DateTime.Now.AddDays(1)};
     //Act
     bool isValid = model.PropertyIsValid("Val2");
     //Assert
     isValid.ShouldBeFalse();
 }
示例#9
0
 public void Less_ValuesAreDates_Val2LesssThanVal1_ExpectTrue()
 {
     //Arrange
     DateTime date = DateTime.Now.Date;
     LessModelOfDates model = new LessModelOfDates {Val1 = date, Val2 = date.AddDays(-1)};
     //Act
     bool isValid = model.PropertyIsValid("Val2");
     //Assert
     isValid.ShouldBeTrue();
 }
示例#10
0
 public void Less_ValuesAreDates_Val2EqualsVal1_ExpectFalse()
 {
     //Arrange
     DateTime date = DateTime.Now.Date;
     LessModelOfDates model = new LessModelOfDates {Val1 = date, Val2 = date};
     //Act
     bool isValid = model.PropertyIsValid("Val2");
     //Assert
     isValid.ShouldBeFalse();
 }
示例#11
0
 public void Less_ValuesAreDates_Val1IsNullAndVal2IsNotNull_ExpectFalse()
 {
     //Arrange
     LessModelOfDates model = new LessModelOfDates {Val1 = null, Val2 = DateTime.Now};
     //Act
     bool isValid = model.PropertyIsValid("Val2");
     //Assert
     isValid.ShouldBeFalse();
 }
示例#12
0
 public void Less_ValuesAreDates_Val1AndVal2_BothNull_ExpectTrue()
 {
     //Arrange
     LessModelOfDates model = new LessModelOfDates {Val1 = null, Val2 = null};
     //Act
     bool isValid = model.PropertyIsValid("Val2");
     //Assert
     isValid.ShouldBeTrue();
 }
示例#13
0
 public void Less_ValuesAreDates_SpecificValue_Val1NotLessThanSpecificValue_ExpectFalse()
 {
     //Arrange
     LessModelOfDates model = new LessModelOfDates { Val1 = new DateTime(2090, 1, 1) };
     //Act
     bool isValid = model.PropertyIsValid("Val1");
     //Assert
     isValid.ShouldBeFalse();
 }
示例#14
0
 public void Less_ValuesAreDates_CompareToCurrentDate_Val3NotLessThanCurrentDate_ExpectFalse()
 {
     //Arrange
     LessModelOfDates model = new LessModelOfDates { Val3 = DateTime.Now.AddDays(1) };
     //Act
     bool isValid = model.PropertyIsValid("Val3");
     //Assert
     isValid.ShouldBeFalse();
 }
示例#15
0
 public void Less_ValuesAreDates_CompareToCurrentDate_Val3EqualCurrentDate_ExpectFalse()
 {
     //Arrange
     LessModelOfDates model = new LessModelOfDates { Val3 = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day) };
     //Act
     bool isValid = model.PropertyIsValid("Val3");
     //Assert
     isValid.ShouldBeFalse();
 }