/// <summary>
        /// Initializes a new instance of the <see cref="BrowserTest"/> class.
        /// </summary>
        /// <param name="fixture">The fixture to use.</param>
        /// <param name="outputHelper">The <see cref="ITestOutputHelper"/> to use.</param>
        protected BrowserTest(HttpServerFixture fixture, ITestOutputHelper outputHelper)
        {
            Fixture = fixture;
            Fixture.SetOutputHelper(outputHelper);
            Output = outputHelper;

            var logger = outputHelper.ToLogger <HttpClientInterceptorOptions>();

            Fixture.Interceptor.OnSend = (request) =>
            {
                logger.LogInformation("HTTP request intercepted. {Request}", request);
                return(Task.CompletedTask);
            };

            _scope = Fixture.Interceptor.BeginScope();
        }
Пример #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="PreferencesTests"/> class.
 /// </summary>
 /// <param name="fixture">The fixture to use.</param>
 /// <param name="outputHelper">The <see cref="ITestOutputHelper"/> to use.</param>
 public PreferencesTests(HttpServerFixture fixture, ITestOutputHelper outputHelper)
     : base(fixture, outputHelper)
 {
 }
Пример #3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AlexaTests"/> class.
 /// </summary>
 /// <param name="fixture">The fixture to use.</param>
 /// <param name="outputHelper">The <see cref="ITestOutputHelper"/> to use.</param>
 public AlexaTests(HttpServerFixture fixture, ITestOutputHelper outputHelper)
     : base(fixture, outputHelper)
 {
     Fixture.Services !.GetRequiredService <InMemoryDocumentStore>().Clear();
 }
Пример #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SiteMapTests"/> class.
 /// </summary>
 /// <param name="fixture">The fixture to use.</param>
 public SiteMapTests(HttpServerFixture fixture)
     : base(fixture)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ResourceTests"/> class.
 /// </summary>
 /// <param name="fixture">The fixture to use.</param>
 public ResourceTests(HttpServerFixture fixture)
     : base(fixture)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AlexaTests"/> class.
 /// </summary>
 /// <param name="fixture">The fixture to use.</param>
 /// <param name="outputHelper">The <see cref="ITestOutputHelper"/> to use.</param>
 public AlexaTests(HttpServerFixture fixture, ITestOutputHelper outputHelper)
     : base(fixture, outputHelper)
 {
 }
Пример #7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AccountTests"/> class.
 /// </summary>
 /// <param name="fixture">The fixture to use.</param>
 public AccountTests(HttpServerFixture fixture)
     : base(fixture)
 {
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AuthenticationTests"/> class.
 /// </summary>
 /// <param name="fixture">The fixture to use.</param>
 /// <param name="outputHelper">The <see cref="ITestOutputHelper"/> to use.</param>
 public AuthenticationTests(HttpServerFixture fixture, ITestOutputHelper outputHelper)
     : base(fixture, outputHelper)
 {
 }
Пример #9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="IntegrationTest"/> class.
 /// </summary>
 /// <param name="fixture">The fixture to use.</param>
 protected IntegrationTest(HttpServerFixture fixture)
 {
     Fixture = fixture;
 }
Пример #10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ApiTests"/> class.
 /// </summary>
 /// <param name="fixture">The fixture to use.</param>
 public ApiTests(HttpServerFixture fixture)
     : base(fixture)
 {
 }