Esempio n. 1
0
        public when_shutting_down_the_runtime()
        {
            theRegistry.Services.ForSingletonOf <IMainService>()
            .Use(mainService);

            feature1 = theRegistry.Feature <FakeFeature1>();

            feature2 = theRegistry.Feature <FakeFeature2>();

            feature3 = theRegistry.Feature <FakeFeature3>();

            theRuntime = JasperRuntime.For(theRegistry);

            theRuntime.Dispose();
        }
Esempio n. 2
0
        public when_bootstrapping_a_runtime_with_multiple_features()
        {
            theRegistry.Services.AddService <IMainService, MainService>();

            feature1 = theRegistry.Feature <FakeFeature1>();
            feature1.Services.For <IFeatureService1>().Use <FeatureService1>();

            feature2 = theRegistry.Feature <FakeFeature2>();
            feature2.Services.For <IFeatureService2>().Use <FeatureService2>();

            feature3 = theRegistry.Feature <FakeFeature3>();
            feature3.Services.For <IFeatureService3>().Use <FeatureService3>();


            theRuntime = JasperRuntime.For(theRegistry);
        }
Esempio n. 3
0
        public when_shutting_down_the_runtime()
        {
            theRegistry.Services.AddSingleton <IMainService>(mainService);

            theRegistry.Services.AddTransient <IFakeStore, FakeStore>();
            theRegistry.Services.For <IWidget>().Use <Widget>();
            theRegistry.Services.For <IFakeService>().Use <FakeService>();

            feature1 = theRegistry.Features.For <FakeFeature1>();

            feature2 = theRegistry.Features.For <FakeFeature2>();

            feature3 = theRegistry.Features.For <FakeFeature3>();

            theRuntime = JasperRuntime.For(theRegistry);

            theRuntime.Dispose();
        }