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); }
public void ThrowsAnExceptionWhenCallbackIsNull() { var target = new DefaultRuntimeHostBuilder(); Assert.Throws <ArgumentNullException>(() => target.ConfigureServices(null)); }