示例#1
0
        public async Task bootstraps_the_runtime()
        {
            using (var system = JasperStorytellerHost.Basic())
            {
                await system.Warmup();

                ShouldBeNullExtensions.ShouldNotBeNull(system.Runtime.Get <BusSettings>());
            }
        }
示例#2
0
        public async Task bootstraps_the_host()
        {
            using (var system = JasperStorytellerHost.Basic())
            {
                await system.Warmup();

                system.Host.Services.GetService <JasperOptions>().ShouldNotBeNull();
            }
        }
        public async Task bootstraps_the_host()
        {
            using (var system = JasperStorytellerHost.Basic(x => { x.HttpRoutes.DisableConventionalDiscovery(); }))
            {
                await system.Warmup();

                system.Runtime.Get <JasperOptions>().ShouldNotBeNull();
            }
        }
示例#4
0
        public async Task bootstraps_the_runtime()
        {
            using (var system = JasperStorytellerHost.Basic(x =>
            {
                x.Handlers.DisableConventionalDiscovery();
                x.Http.Actions.DisableConventionalDiscovery();
            }))
            {
                await system.Warmup();

                ShouldBeNullExtensions.ShouldNotBeNull(system.Runtime.Get <BusSettings>());
            }
        }
示例#5
0
        private static int Main(string[] args)
        {
            // SAMPLE: adding-external-node
            var host = new JasperStorytellerHost <MyJasperAppRegistry>();

            host.AddNode(new OtherApp());

            return(StorytellerAgent.Run(args, host));
            // ENDSAMPLE

            /*
             * // SAMPLE: bootstrapping-storyteller-with-Jasper
             * JasperStorytellerHost.Run<MyJasperAppRegistry>(args);
             * // ENDSAMPLE
             */
        }
示例#6
0
        static void Main(string[] args)
        {
            if (args[0] == "try")
            {
                using (var runner = StorytellerRunner.For <JasperStorytellerHost <MyJasperAppRegistry> >())
                {
                    runner.Run("Recording Messages / Try out the diagnostics");
                    runner.OpenResultsInBrowser();
                }


                return;
            }

            // SAMPLE: bootstrapping-storyteller-with-Jasper
            JasperStorytellerHost.Run <MyJasperAppRegistry>(args);
            // ENDSAMPLE
        }
        public async Task adds_console_and_debug_logging()
        {
            using (var system = JasperStorytellerHost.Basic(x => { x.HttpRoutes.DisableConventionalDiscovery(); }))
            {
                await system.Warmup();

                var providerTypes = system
                                    .Runtime
                                    .Container
                                    .Model
                                    .For <ILoggerProvider>()
                                    .Instances
                                    .Select(x => x.ImplementationType)
                                    .ToArray();

                providerTypes.ShouldContain(typeof(ConsoleLoggerProvider));
                providerTypes.ShouldContain(typeof(DebugLoggerProvider));
            }
        }