/*
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
* See https://github.com/openiddict/openiddict-core for more information concerning
* the license and the contributors participating to this project.
*/
using Microsoft.Owin.Testing;
using OpenIddict.Server.IntegrationTests;
namespace OpenIddict.Server.Owin.IntegrationTests;
///
/// Represents a test host used by the server integration tests.
///
public class OpenIddictServerOwinIntegrationTestServer : OpenIddictServerIntegrationTestServer
{
public OpenIddictServerOwinIntegrationTestServer(TestServer server)
=> Server = server;
///
/// Gets the ASP.NET Core test server used by this instance.
///
public TestServer Server { get; }
public override ValueTask CreateClientAsync()
=> new(new OpenIddictServerIntegrationTestClient(Server.HttpClient));
public override ValueTask DisposeAsync()
{
// Dispose of the underlying test server.
Server.Dispose();
return ValueTask.CompletedTask;
}
}