Ejemplo n.º 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();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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();
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 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();
 }