예제 #1
0
        public void CreateStartupTest()
        {
            Assert.Null(StartupLoader.CreateStartup(null));

            Assert.NotNull(StartupLoader.CreateStartup(typeof(EmptyStartup)));

            Assert.NotNull(StartupLoader.CreateStartup(typeof(CreateStartupTestStartup1)));

            Assert.Throws <InvalidOperationException>(() => StartupLoader.CreateStartup(typeof(CreateStartupTestStartup2)));

            Assert.Throws <InvalidOperationException>(() => StartupLoader.CreateStartup(typeof(CreateStartupTestStartup3)));

            Assert.Throws <InvalidOperationException>(() => StartupLoader.CreateStartup(typeof(CreateStartupTestStartup4)));
        }