public void BuildWebHostPattern_CanFindWebHost() { var factory = HostFactoryResolver.ResolveWebHostFactory <IWebHost>(typeof(BuildWebHostPatternTestSite.Program).Assembly); Assert.NotNull(factory); Assert.IsAssignableFrom <IWebHost>(factory(Array.Empty <string>())); }
public void BuildWebHostPattern__Invalid_CantFindWebHost() { var factory = HostFactoryResolver.ResolveWebHostFactory <IWebHost>(typeof(BuildWebHostInvalidSignature.Program).Assembly); Assert.Null(factory); }