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