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