Example #1
0
 public void ShouldInsertNormallyJustOneDate()
 {
     using (var executionContext = new CommonTestExecutionContext())
     {
         var repository = new Common.DomRepository(executionContext);
         var entity = new DateRangeWithoutDef { FromDate = DateTime.Today };
         var entity2 = new DateRangeWithoutDef { ToDate = DateTime.Today };
         repository.TestRange.DateRangeWithoutDef.Insert(new[] { entity, entity2 });
     }
 }
Example #2
0
 public void ShouldInsertNormallyJustOneDate()
 {
     using (var container = new RhetosTestContainer())
     {
         var repository = container.Resolve<Common.DomRepository>();
         var entity = new DateRangeWithoutDef { FromDate = DateTime.Today };
         var entity2 = new DateRangeWithoutDef { ToDate = DateTime.Today };
         repository.TestRange.DateRangeWithoutDef.Insert(new[] { entity, entity2 });
     }
 }
Example #3
0
 public void ShoulInsertNormallySameDates()
 {
     using (var container = new RhetosTestContainer())
     {
         var repository = container.Resolve <Common.DomRepository>();
         var entity     = new DateRangeWithoutDef {
             FromDate = DateTime.Today, ToDate = DateTime.Today
         };
         repository.TestRange.DateRangeWithoutDef.Insert(new[] { entity });
     }
 }
Example #4
0
 public void ShoulInsertNormallySameDates()
 {
     using (var scope = TestScope.Create())
     {
         var repository = scope.Resolve <Common.DomRepository>();
         var entity     = new DateRangeWithoutDef {
             FromDate = DateTime.Today, ToDate = DateTime.Today
         };
         repository.TestRange.DateRangeWithoutDef.Insert(new[] { entity });
     }
 }
Example #5
0
        public void ShouldThowUserExceptionOnUpdateDate()
        {
            using (var container = new RhetosTestContainer())
            {
                var repository = container.Resolve <Common.DomRepository>();
                var entity     = new DateRangeWithoutDef {
                    FromDate = DateTime.Today, ToDate = DateTime.Today.AddDays(2)
                };
                repository.TestRange.DateRangeWithoutDef.Insert(new[] { entity });

                entity.ToDate = DateTime.Today.AddDays(-2);
                repository.TestRange.DateRangeWithoutDef.Update(new[] { entity });
            }
        }
Example #6
0
 public void ShoulInsertNormallyDate()
 {
     using (var container = new RhetosTestContainer())
     {
         var repository = container.Resolve<Common.DomRepository>();
         var entity = new DateRangeWithoutDef { FromDate = DateTime.Today, ToDate = DateTime.Today.AddDays(2) };
         repository.TestRange.DateRangeWithoutDef.Insert(new[] { entity });
     }
 }
Example #7
0
        public void ShouldThowUserExceptionOnUpdateDate()
        {
            using (var container = new RhetosTestContainer())
            {
                var repository = container.Resolve<Common.DomRepository>();
                var entity = new DateRangeWithoutDef { FromDate = DateTime.Today, ToDate = DateTime.Today.AddDays(2) };
                repository.TestRange.DateRangeWithoutDef.Insert(new[] { entity });

                entity.ToDate = DateTime.Today.AddDays(-2);
                repository.TestRange.DateRangeWithoutDef.Update(new[] { entity });
            }
        }
Example #8
0
 public void ShoulInsertNormallyDate()
 {
     using (var executionContext = new CommonTestExecutionContext())
     {
         var repository = new Common.DomRepository(executionContext);
         var entity = new DateRangeWithoutDef { FromDate = DateTime.Today, ToDate = DateTime.Today.AddDays(2) };
         repository.TestRange.DateRangeWithoutDef.Insert(new[] { entity });
     }
 }
Example #9
0
        public void ShouldThowUserExceptionOnUpdateDate()
        {
            using (var executionContext = new CommonTestExecutionContext())
            {
                var repository = new Common.DomRepository(executionContext);
                var entity = new DateRangeWithoutDef { FromDate = DateTime.Today, ToDate = DateTime.Today.AddDays(2) };
                repository.TestRange.DateRangeWithoutDef.Insert(new[] { entity });

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