Example #1
0
 public void Equal_ValuesAreDates_Tomorrow_Val7DoesNotEqualTomorrow_ExpectFalse()
 {
     //Arrange
     EqualModelOfDates model = new EqualModelOfDates {Val7 = DateTime.Now.Date};
     //Act
     bool isValid = model.PropertyIsValid("Val7");
     //Assert
     isValid.ShouldBeFalse();
 }
Example #2
0
 public void Equal_ValuesAreDates_CurrentDate_Val3EqualsCurrentDate_ExpectTrue()
 {
     //Arrange
     EqualModelOfDates model = new EqualModelOfDates {Val3 = DateTime.Now.Date};
     //Act
     bool isValid = model.PropertyIsValid("Val3");
     //Assert
     isValid.ShouldBeTrue();
 }
Example #3
0
 public void Equal_ValuesAreDates_Tomorrow_Val7EqualsTomorrow_ExpectTrue()
 {
     //Arrange
     EqualModelOfDates model = new EqualModelOfDates {Val7 = DateTime.Now.AddDays(1).Date};
     //Act
     bool isValid = model.PropertyIsValid("Val7");
     //Assert
     isValid.ShouldBeTrue();
 }
Example #4
0
 public void Equal_ValuesAreDates_CurrentDate_Val3DoesNotEqualCurrentDate_ExpectFalse()
 {
     //Arrange
     EqualModelOfDates model = new EqualModelOfDates{Val3 = DateTime.Now.AddDays(-1).Date};
     //Act
     bool isValid = model.PropertyIsValid("Val3");
     //Assert
     isValid.ShouldBeFalse();
 }
Example #5
0
 public void Equal_ValuesAreDates_SpecificValue_Val1DoesNotEqualSpecificValue_ExpectFalse()
 {
     //Arrange
     EqualModelOfDates model = new EqualModelOfDates {Val1 = DateTime.Now};
     //Act
     bool isValid = model.PropertyIsValid("Val1");
     //Assert
     isValid.ShouldBeFalse();
 }
Example #6
0
 public void Equal_ValuesAreDates_SpecificValue_Val1EqualsSpecificValue_ExpectTrue()
 {
     //Arrange
     EqualModelOfDates model = new EqualModelOfDates {Val1 = new DateTime(2010, 12, 31)};
     //Act
     bool isValid = model.PropertyIsValid("Val1");
     //Assert
     isValid.ShouldBeTrue();
 }
Example #7
0
        public void Equal_ValuesAreDates_Yesterday_Val6EqualsYesterday_ExpectTrue()
        {
            //Arrange
            EqualModelOfDates model = new EqualModelOfDates {
                Val6 = DateTime.Now.AddDays(-1).Date
            };
            //Act
            bool isValid = model.PropertyIsValid("Val6");

            //Assert
            isValid.ShouldBeTrue();
        }
Example #8
0
        public void Equal_ValuesAreDates_Val1IsNullAndVal2IsNotNull_ExpectFalse()
        {
            //Arrange
            EqualModelOfDates model = new EqualModelOfDates {
                Val1 = null, Val2 = DateTime.Now
            };
            //Act
            bool isValid = model.PropertyIsValid("Val2");

            //Assert
            isValid.ShouldBeFalse();
        }
Example #9
0
        public void Equal_ValuesAreDates_Tomorrow_Val7IsNull_ExpectTrue()
        {
            //Arrange
            EqualModelOfDates model = new EqualModelOfDates {
                Val7 = null
            };
            //Act
            bool isValid = model.PropertyIsValid("Val7");

            //Assert
            isValid.ShouldBeTrue();
        }
Example #10
0
        public void Equal_ValuesAreDates_Tomorrow_Val7EqualsTomorrow_ExpectTrue()
        {
            //Arrange
            EqualModelOfDates model = new EqualModelOfDates {
                Val7 = DateTime.Now.AddDays(1).Date
            };
            //Act
            bool isValid = model.PropertyIsValid("Val7");

            //Assert
            isValid.ShouldBeTrue();
        }
Example #11
0
        public void Equal_ValuesAreDates_Yesterday_Val6DoesNotEqualYesterday_ExpectFalse()
        {
            //Arrange
            EqualModelOfDates model = new EqualModelOfDates {
                Val6 = DateTime.Now.Date
            };
            //Act
            bool isValid = model.PropertyIsValid("Val6");

            //Assert
            isValid.ShouldBeFalse();
        }
Example #12
0
        public void Equal_ValuesAreDates_Yesterday_Val6IsNull_ExpectTrue()
        {
            //Arrange
            EqualModelOfDates model = new EqualModelOfDates {
                Val6 = null
            };
            //Act
            bool isValid = model.PropertyIsValid("Val6");

            //Assert
            isValid.ShouldBeTrue();
        }
Example #13
0
        public void Equal_ValuesAreDates_CurrentDate_Val3DoesNotEqualCurrentDate_ExpectFalse()
        {
            //Arrange
            EqualModelOfDates model = new EqualModelOfDates {
                Val3 = DateTime.Now.AddDays(-1).Date
            };
            //Act
            bool isValid = model.PropertyIsValid("Val3");

            //Assert
            isValid.ShouldBeFalse();
        }
Example #14
0
        public void Equal_ValuesAreDates_CurrentDate_Val3EqualsCurrentDate_ExpectTrue()
        {
            //Arrange
            EqualModelOfDates model = new EqualModelOfDates {
                Val3 = DateTime.Now.Date
            };
            //Act
            bool isValid = model.PropertyIsValid("Val3");

            //Assert
            isValid.ShouldBeTrue();
        }
Example #15
0
        public void Equal_ValuesAreDates_SpecificValue_Val1DoesNotEqualSpecificValue_ExpectFalse()
        {
            //Arrange
            EqualModelOfDates model = new EqualModelOfDates {
                Val1 = DateTime.Now
            };
            //Act
            bool isValid = model.PropertyIsValid("Val1");

            //Assert
            isValid.ShouldBeFalse();
        }
Example #16
0
        public void Equal_ValuesAreDates_SpecificValue_Val1EqualsSpecificValue_ExpectTrue()
        {
            //Arrange
            EqualModelOfDates model = new EqualModelOfDates {
                Val1 = new DateTime(2010, 12, 31)
            };
            //Act
            bool isValid = model.PropertyIsValid("Val1");

            //Assert
            isValid.ShouldBeTrue();
        }
Example #17
0
        public void Equal_ValuesAreDates_Val1DoesNotEqualVal2_ExpectFalse()
        {
            //Arrange
            EqualModelOfDates model = new EqualModelOfDates {
                Val1 = DateTime.Now, Val2 = DateTime.Now.AddDays(1)
            };
            //Act
            bool isValid = model.PropertyIsValid("Val2");

            //Assert
            isValid.ShouldBeFalse();
        }
Example #18
0
        public void Equal_ValuesAreDates_Tomorrow_Val7DoesNotEqualTomorrow_ExpectFalse()
        {
            //Arrange
            EqualModelOfDates model = new EqualModelOfDates {
                Val7 = DateTime.Now.Date
            };
            //Act
            bool isValid = model.PropertyIsValid("Val7");

            //Assert
            isValid.ShouldBeFalse();
        }
Example #19
0
        public void Equal_ValuesAreDates_Val1AndVal2_BothNull_ExpectTrue()
        {
            //Arrange
            EqualModelOfDates model = new EqualModelOfDates {
                Val1 = null, Val2 = null
            };
            //Act
            bool isValid = model.PropertyIsValid("Val2");

            //Assert
            isValid.ShouldBeTrue();
        }
Example #20
0
        public void Equal_ValuesAreDates_Val1EqualsVal2_ExpectTrue()
        {
            //Arrange
            DateTime          date  = DateTime.Now.Date;
            EqualModelOfDates model = new EqualModelOfDates {
                Val1 = date, Val2 = date
            };
            //Act
            bool isValid = model.PropertyIsValid("Val2");

            //Assert
            isValid.ShouldBeTrue();
        }
Example #21
0
 public void Equal_ValuesAreDates_Tomorrow_Val7IsNull_ExpectTrue()
 {
     //Arrange
     EqualModelOfDates model = new EqualModelOfDates {Val7 = null};
     //Act
     bool isValid = model.PropertyIsValid("Val7");
     //Assert
     isValid.ShouldBeTrue();
 }
Example #22
0
 public void Equal_ValuesAreDates_Val1EqualsVal2_ExpectTrue()
 {
     //Arrange
     DateTime date = DateTime.Now.Date;
     EqualModelOfDates model = new EqualModelOfDates {Val1 = date, Val2 = date};
     //Act
     bool isValid = model.PropertyIsValid("Val2");
     //Assert
     isValid.ShouldBeTrue();
 }
Example #23
0
 public void Equal_ValuesAreDates_Val1IsNullAndVal2IsNotNull_ExpectFalse()
 {
     //Arrange
     EqualModelOfDates model = new EqualModelOfDates {Val1 = null, Val2 = DateTime.Now};
     //Act
     bool isValid = model.PropertyIsValid("Val2");
     //Assert
     isValid.ShouldBeFalse();
 }
Example #24
0
 public void Equal_ValuesAreDates_Yesterday_Val6IsNull_ExpectTrue()
 {
     //Arrange
     EqualModelOfDates model = new EqualModelOfDates {Val6 = null};
     //Act
     bool isValid = model.PropertyIsValid("Val6");
     //Assert
     isValid.ShouldBeTrue();
 }
Example #25
0
 public void Equal_ValuesAreDates_Yesterday_Val6DoesNotEqualYesterday_ExpectFalse()
 {
     //Arrange
     EqualModelOfDates model = new EqualModelOfDates {Val6 = DateTime.Now.Date};
     //Act
     bool isValid = model.PropertyIsValid("Val6");
     //Assert
     isValid.ShouldBeFalse();
 }
Example #26
0
 public void Equal_ValuesAreDates_Yesterday_Val6EqualsYesterday_ExpectTrue()
 {
     //Arrange
     EqualModelOfDates model = new EqualModelOfDates {Val6 = DateTime.Now.AddDays(-1).Date};
     //Act
     bool isValid = model.PropertyIsValid("Val6");
     //Assert
     isValid.ShouldBeTrue();
 }
Example #27
0
 public void Equal_ValuesAreDates_Val1AndVal2_BothNull_ExpectTrue()
 {
     //Arrange
     EqualModelOfDates model = new EqualModelOfDates {Val1 = null, Val2 = null};
     //Act
     bool isValid = model.PropertyIsValid("Val2");
     //Assert
     isValid.ShouldBeTrue();
 }
Example #28
0
 public void Equal_ValuesAreDates_Val1DoesNotEqualVal2_ExpectFalse()
 {
     //Arrange
     EqualModelOfDates model = new EqualModelOfDates {Val1 = DateTime.Now, Val2 = DateTime.Now.AddDays(1)};
     //Act
     bool isValid = model.PropertyIsValid("Val2");
     //Assert
     isValid.ShouldBeFalse();
 }