コード例 #1
0
 public CallbackTests(IntegrationTestsWebApplicationFactory <Startup> factory, ITestOutputHelper output)
 {
     Factory = factory;
     Output  = output;
     Factory.ClearInvocations();
     Client = factory.CreateClient(new WebApplicationFactoryClientOptions
     {
         AllowAutoRedirect = false
     });
 }
コード例 #2
0
        public ControllerTestsBase(IntegrationTestsWebApplicationFactory <TestStartup> factory,
                                   string baseUri)
        {
            _factory = factory;

            _mapper = _factory.Services.GetRequiredService <IMapper>();

            context = ConfigureTestDbContext();
            context.Database.Migrate();
            db = new UnitOfWork(context);

            if (!String.IsNullOrEmpty(baseUri))
            {
                _factory.ClientOptions.BaseAddress = new Uri(baseUri);
            }

            _client = _factory.CreateClient();
        }
コード例 #3
0
 public DeleteUsersTests(IntegrationTestsWebApplicationFactory <Web.Startup> factory)
 {
     client = factory.CreateClient();
 }
コード例 #4
0
 public PostRestaurantTests(IntegrationTestsWebApplicationFactory <Web.Startup> factory)
 {
     client = factory.CreateClient();
 }