Beispiel #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 });
     }
 }
Beispiel #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 });
     }
 }
Beispiel #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 });
            }
        }
Beispiel #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 });
            }
        }
Beispiel #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 });
     }
 }
Beispiel #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 });
     }
 }
Beispiel #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 });
            }
        }