Skip to main content

Definition

Assembly: CloudNimble.Breakdance.WebApi.dll Namespace: CloudNimble.Breakdance.WebApi Inheritance: System.Object

Syntax

CloudNimble.Breakdance.WebApi.WebApiTestHelpers

Summary

A set of methods that make it easier to pull out WebApi runtime components for unit testing.

Remarks

See WebApiTestHelperTests.cs for more examples of how to use these methods.

Methods

GetTestableConfiguration

Gets a new HttpConfiguration using the default AttributeRouting mapping engine, suitable for use in unit tests.

Syntax

public static System.Web.Http.HttpConfiguration GetTestableConfiguration()

Returns

Type: System.Web.Http.HttpConfiguration A new HttpConfiguration instance.

GetTestableHttpClient

Gets a new HttpClient instance using the default AttributeRouting mapping engine, suitable for use in unit tests

Syntax

public static System.Net.Http.HttpClient GetTestableHttpClient()

Returns

Type: System.Net.Http.HttpClient a new HttpClient instance.

GetTestableHttpServer

Gets a new HttpServer using the default AttributeRouting mapping engine, suitable for use in unit tests.

Syntax

public static System.Web.Http.HttpServer GetTestableHttpServer()

Returns

Type: System.Web.Http.HttpServer A new HttpServer instance.