Exemplo n.º 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 });
     }
 }
Exemplo n.º 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 });
     }
 }
Exemplo n.º 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 });
     }
 }
Exemplo n.º 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 });
     }
 }
Exemplo n.º 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 });
            }
        }
Exemplo n.º 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 });
     }
 }
Exemplo n.º 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 });
            }
        }
Exemplo n.º 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 });
     }
 }
Exemplo n.º 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 });
            }
        }