コード例 #1
0
        public void ShouldRunTheCallbackWhenBeingBuilt()
        {
            var called = false;

            var target = new DefaultRuntimeHostBuilder();

            target.ConfigureServices(services => { called = true; });
            target.UseStartup(new StubStartup());

            Assert.IsNotNull(target.Build());
            Assert.True(called);
        }
コード例 #2
0
        public void ThrowsAnExceptionWhenCallbackIsNull()
        {
            var target = new DefaultRuntimeHostBuilder();

            Assert.Throws <ArgumentNullException>(() => target.ConfigureServices(null));
        }