Ejemplo n.º 1
0
 public void NotEqualTest()
 {
     ExecuteInsideSession(() => {
         RunTest <SingleDateTimeEntity>(c => c.DateTime != FirstDateTime.AddYears(1));
         RunTest <SingleDateTimeEntity>(c => c.MillisecondDateTime != FirstMillisecondDateTime.AddYears(1));
         RunTest <SingleDateTimeEntity>(c => c.NullableDateTime != NullableDateTime.AddYears(1));
     });
 }
Ejemplo n.º 2
0
        public void AddYearsTest()
        {
            ExecuteInsideSession(() => {
                RunTest <SingleDateTimeEntity>(c => c.DateTime.AddYears(1) == FirstDateTime.AddYears(1));
                RunTest <SingleDateTimeEntity>(c => c.MillisecondDateTime.AddYears(-2) == FirstMillisecondDateTime.AddYears(-2));
                RunTest <SingleDateTimeEntity>(c => c.NullableDateTime.Value.AddYears(33) == NullableDateTime.AddYears(33));

                RunWrongTest <SingleDateTimeEntity>(c => c.DateTime.AddYears(1) == FirstDateTime.AddYears(2));
                RunWrongTest <SingleDateTimeEntity>(c => c.MillisecondDateTime.AddYears(-1) == FirstMillisecondDateTime.AddYears(-2));
                RunWrongTest <SingleDateTimeEntity>(c => c.NullableDateTime.Value.AddYears(33) == NullableDateTime.AddYears(44));
            });
        }