Пример #1
0
        public static void Main()
        {
            var engine = new FizzBuzzEngine <Startup>();

            engine.Build();
            engine.Run();
        }
Пример #2
0
        public void Build_CallsAddServicesInStartup()
        {
            var engine = new FizzBuzzEngine <SimpleFakeStartup>();

            engine.Build();

            Assert.IsTrue(SimpleFakeStartup.AddedServices);
        }
Пример #3
0
        public void Run_WithComplexStartup_RunsToCompletion()
        {
            var engine = new FizzBuzzEngine <ComplexFakeStartup>();

            engine.Build();
            engine.Run();

            Assert.IsTrue(ComplexFakeStartup.RanToCompletion);
        }
Пример #4
0
        public void Run_AfterBuild_CallsRunInStartupAndWaitsForCompletion()
        {
            var engine = new FizzBuzzEngine <SimpleFakeStartup>();

            engine.Build();
            engine.Run();

            Assert.IsTrue(SimpleFakeStartup.RanToCompletion);
        }
Пример #5
0
        private static void Main()
        {
            var engine = new FizzBuzzEngine <Startup>();

            engine.Build();
            engine.Run();

            Console.WriteLine("Press any key to exit");
            Console.ReadKey(true);
        }
Пример #6
0
        public void Build_WithComplexStartup_InjectsPrerequisites()
        {
            var engine = new FizzBuzzEngine <ComplexFakeStartup>();

            engine.Build();

            Assert.IsNotNull(ComplexFakeStartup.FizzBuzzService);
            Assert.IsNotNull(ComplexFakeStartup.Factory);
            Assert.IsTrue(ComplexFakeStartup.AddedServices);
        }