예제 #1
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();
            }
        }
예제 #2
0
파일: Semantikk.cs 프로젝트: goeran/TinyBDD
 public GittSemantikk Gitt(Gitt aksjon)
 {
     return Gitt(metadataParser.TranslateToText(aksjon), () => { aksjon(); });
 }
예제 #3
0
 public void Given()
 {
     _container = RestApiApplication.CreateContainer();
     _gitt = new Gitt(_container);
     _dataContextFactory = _container.Resolve<DataContextFactory>();
     _dataContextFactory.DeleteAllData();
     TimeService.ResetToRealTime();
 }
예제 #4
0
 public GittSemantikk Og(Gitt kode)
 {
     return Og(metadataParser.TranslateToText(kode), () => { kode(); });
 }
예제 #5
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();
            }
        }