Пример #1
0
        public void SavingAndRetrievingTest()
        {
            DateTime Now = DateTime.Now;

            SavingAndRetrievingAction(new AllDates {
                Sql_date = Now
            },
                                      entity => DateTimeAssert.AreEqual(entity.Sql_date, Now, true));
        }
Пример #2
0
        public async Task SavingAndRetrievingTestAsync()
        {
            DateTime Now = DateTime.Now;

            return(SavingAndRetrievingActionAsync(new AllDates {
                Sql_date = Now
            },
                                                  entity => DateTimeAssert.AreEqual(entity.Sql_date, Now, true)));
        }
Пример #3
0
        public void SavingAndRetrievingTest()
        {
            DateTimeOffset NowOS = DateTimeOffset.Now;

            SavingAndRetrievingAction(new AllDates {
                Sql_datetimeoffset = NowOS
            },
                                      entity => DateTimeAssert.AreEqual(entity.Sql_datetimeoffset, NowOS));
        }
Пример #4
0
 public Task SavingAndRetrievingTestAsync()
 {
     try
     {
         DateTime Now = DateTime.Now;
         return(SavingAndRetrievingActionAsync(new AllDates {
             Sql_date = Now
         },
                                               entity => DateTimeAssert.AreEqual(entity.Sql_date, Now, true)));
     }
     catch (Exception ex)
     {
         return(Task.FromException <object>(ex));
     }
 }
Пример #5
0
        public async Task SavingAndRetrievingTestAsync()
        {
            DateTime Now = DateTime.Now;

            await(SavingAndRetrievingActionAsync(new AllDates {
                Sql_datetime2 = Now
            },
                                                 entity => DateTimeAssert.AreEqual(entity.Sql_datetime2, Now)));

            await(SavingAndRetrievingActionAsync(new AllDates {
                Sql_datetime2 = DateTime.MinValue
            },
                                                 entity => DateTimeAssert.AreEqual(entity.Sql_datetime2, DateTime.MinValue)));

            await(SavingAndRetrievingActionAsync(new AllDates {
                Sql_datetime2 = DateTime.MaxValue
            },
                                                 entity => DateTimeAssert.AreEqual(entity.Sql_datetime2, DateTime.MaxValue)));
        }
Пример #6
0
        public void SavingAndRetrievingTest()
        {
            DateTime Now = DateTime.Now;

            SavingAndRetrievingAction(new AllDates {
                Sql_datetime2 = Now
            },
                                      entity => DateTimeAssert.AreEqual(entity.Sql_datetime2, Now));

            SavingAndRetrievingAction(new AllDates {
                Sql_datetime2 = DateTime.MinValue
            },
                                      entity => DateTimeAssert.AreEqual(entity.Sql_datetime2, DateTime.MinValue));

            SavingAndRetrievingAction(new AllDates {
                Sql_datetime2 = DateTime.MaxValue
            },
                                      entity => DateTimeAssert.AreEqual(entity.Sql_datetime2, DateTime.MaxValue));
        }