コード例 #1
0
 public void Given()
 {
     _container          = RestApiApplication.CreateContainer();
     _gitt               = new Gitt(_container);
     _dataContextFactory = _container.Resolve <DataContextFactory>();
     TimeService.ResetToRealTime();
 }
コード例 #2
0
        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();
            }
        }
コード例 #3
0
        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();
            }
        }