Ejemplo n.º 1
0
        public static PagesApplication CreateApplication()
        {
            var webApp            = new WebApplicationFactory <Startup>();
            var httpClient        = webApp.CreateClient();
            var razorPagesFactory = new RazorPageFactory(webApp.CreateClient(), webApp.Services);

            return(new PagesApplication(webApp, razorPagesFactory, httpClient));
        }
Ejemplo n.º 2
0
 public PagesApplication(
     WebApplicationFactory <Startup> webApplicationFactory,
     RazorPageFactory razorPageFactory,
     HttpClient httpClient)
 {
     WebApplicationFactory = webApplicationFactory;
     RazorPageFactory      = razorPageFactory;
     HttpClient            = httpClient;
 }