public void Given() { _container = RestApiApplication.CreateContainer(); _gitt = new Gitt(_container); _dataContextFactory = _container.Resolve <DataContextFactory>(); TimeService.ResetToRealTime(); }
public void Given() { _container = RestApiApplication.CreateContainer(); _gitt = new Gitt(_container); _dataContextFactory = _container.Resolve <DataContextFactory>(); TimeService.ResetToRealTime(); // Slett alle meldinger (blir rullet tilbake i transaksjon uansett) using (var context = _dataContextFactory.Create()) { context.Meldinger.Clear(); context.SaveChanges(); } }
public void Given() { _container = RestApiApplication.CreateContainer(); _appSettings = new OverridableSettings(); _container.Register(Component.For <OverridableSettings>().Instance(_appSettings).IsDefault().Named(Guid.NewGuid().ToString())); _gitt = new Gitt(_container); _dataContextFactory = _container.Resolve <DataContextFactory>(); TimeService.ResetToRealTime(); // Slett alle posisjoner (blir rullet tilbake i transaksjon uansett) using (var context = _dataContextFactory.Create()) { context.DeltakerPosisjoner.Clear(); context.SaveChanges(); } }