Пример #1
0
 public void ShoulInsertNormallySameDateTime()
 {
     using (var container = new RhetosTestContainer())
     {
         var repository = container.Resolve <Common.DomRepository>();
         var entity     = new DateTimeRangeWithoutDef {
             FromDate = DateTime.Today, ToDate = DateTime.Today
         };
         repository.TestRange.DateTimeRangeWithoutDef.Insert(new[] { entity });
     }
 }
Пример #2
0
 public void ShoulInsertNormallySameDateTime()
 {
     using (var scope = TestScope.Create())
     {
         var repository = scope.Resolve <Common.DomRepository>();
         var entity     = new DateTimeRangeWithoutDef {
             FromDate = DateTime.Today, ToDate = DateTime.Today
         };
         repository.TestRange.DateTimeRangeWithoutDef.Insert(new[] { entity });
     }
 }
Пример #3
0
        public void ShouldThowUserExceptionOnUpdateDateTime()
        {
            using (var container = new RhetosTestContainer())
            {
                var repository = container.Resolve <Common.DomRepository>();
                var entity     = new DateTimeRangeWithoutDef {
                    FromDate = DateTime.Today, ToDate = DateTime.Today.AddDays(2)
                };
                repository.TestRange.DateTimeRangeWithoutDef.Insert(new[] { entity });

                entity.ToDate = DateTime.Today.AddDays(-2);
                repository.TestRange.DateTimeRangeWithoutDef.Update(new[] { entity });
            }
        }
Пример #4
0
        public void ShouldThowUserExceptionOnUpdateDateTime()
        {
            using (var container = new RhetosTestContainer())
            {
                var repository = container.Resolve<Common.DomRepository>();
                var entity = new DateTimeRangeWithoutDef { FromDate = DateTime.Today, ToDate = DateTime.Today.AddDays(2) };
                repository.TestRange.DateTimeRangeWithoutDef.Insert(new[] { entity });

                entity.ToDate = DateTime.Today.AddDays(-2);
                repository.TestRange.DateTimeRangeWithoutDef.Update(new[] { entity });
            }
        }
Пример #5
0
 public void ShoulInsertNormallySameDateTime()
 {
     using (var container = new RhetosTestContainer())
     {
         var repository = container.Resolve<Common.DomRepository>();
         var entity = new DateTimeRangeWithoutDef { FromDate = DateTime.Today, ToDate = DateTime.Today };
         repository.TestRange.DateTimeRangeWithoutDef.Insert(new[] { entity });
     }
 }
Пример #6
0
 public void ShoulInsertNormallySameDateTime()
 {
     using (var executionContext = new CommonTestExecutionContext())
     {
         var repository = new Common.DomRepository(executionContext);
         var entity = new DateTimeRangeWithoutDef { FromDate = DateTime.Today, ToDate = DateTime.Today };
         repository.TestRange.DateTimeRangeWithoutDef.Insert(new[] { entity });
     }
 }
Пример #7
0
        public void ShouldThowUserExceptionOnUpdateDateTime()
        {
            using (var executionContext = new CommonTestExecutionContext())
            {
                var repository = new Common.DomRepository(executionContext);
                var entity = new DateTimeRangeWithoutDef { FromDate = DateTime.Today, ToDate = DateTime.Today.AddDays(2) };
                repository.TestRange.DateTimeRangeWithoutDef.Insert(new[] { entity });

                entity.ToDate = DateTime.Today.AddDays(-2);
                repository.TestRange.DateTimeRangeWithoutDef.Update(new[] { entity });
            }
        }