TestServer Class

 

Helps construct an in-memory OWIN pipeline and dispatch requests using HttpClient.

Namespace:   Microsoft.Owin.Testing
Assembly:  Microsoft.Owin.Testing (in Microsoft.Owin.Testing.dll)

Inheritance Hierarchy

System.Object
  Microsoft.Owin.Testing.TestServer

Syntax

public class TestServer : IDisposable
public ref class TestServer : IDisposable
type TestServer = 
    class
        interface IDisposable
    end
Public Class TestServer
    Implements IDisposable

Constructors

Name Description
System_CAPS_protmethod TestServer()

Initializes a new instance of the TestServer class.

Properties

Name Description
System_CAPS_pubproperty BaseAddress

Gets or sets the base address used when making requests. The default is 'https://localhost/'.

System_CAPS_pubproperty Handler

The base handler that transitions to the OWIN pipeline. Wrap this instance to add intermediate handlers.

System_CAPS_pubproperty HttpClient

Returns a new HttpClient which wraps the Handler and is capable of submitting requests to the OWIN pipeline.

Methods

Name Description
System_CAPS_protmethod Configure(Action<IAppBuilder>)

Configures the OWIN pipeline.

System_CAPS_protmethod Configure(Action<IAppBuilder>, StartOptions)

Configures the OWIN pipeline.

System_CAPS_protmethod Configure<TStartup>()

Configures the OWIN pipeline.

System_CAPS_protmethod Configure<TStartup>(StartOptions)

Configures the OWIN pipeline.

System_CAPS_pubmethodSystem_CAPS_static Create(Action<IAppBuilder>)

Create a new TestServer instance and configure the OWIN pipeline.

System_CAPS_pubmethodSystem_CAPS_static Create<TStartup>()

Create a new TestServer instance and configure the OWIN pipeline.

System_CAPS_pubmethod CreateRequest(String)

Begins constructing a request message for submission.

System_CAPS_pubmethod Dispose()

Disposes TestServer and OWIN pipeline.

System_CAPS_protmethod Dispose(Boolean)

Disposes TestServer and OWIN pipeline.

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_pubmethod Invoke(IDictionary<String, Object>)

Directly invokes the OWIN pipeline with the given OWIN environment.

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ToString()

(Inherited from Object.)

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.Owin.Testing Namespace

Return to top