> ## Documentation Index
> Fetch the complete documentation index at: https://easyaf.nimbleapps.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# WebApiTestHelpers

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

## Definition

**Assembly:** CloudNimble.Breakdance.WebApi.dll

**Namespace:** CloudNimble.Breakdance.WebApi

**Inheritance:** System.Object

## Syntax

```csharp theme={"dark"}
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

### &#x20;GetTestableConfiguration

Gets a new [HttpConfiguration](https://easyaf.nimbleapps.cloud/breakdance/api-reference/System/Web/Http/HttpConfiguration.md) using the default AttributeRouting mapping engine, suitable for use in unit tests.

#### Syntax

```csharp theme={"dark"}
public static System.Web.Http.HttpConfiguration GetTestableConfiguration()
```

#### Returns

Type: `System.Web.Http.HttpConfiguration`
A new [HttpConfiguration](https://easyaf.nimbleapps.cloud/breakdance/api-reference/System/Web/Http/HttpConfiguration.md) instance.

### &#x20;GetTestableHttpClient

Gets a new [HttpClient](https://easyaf.nimbleapps.cloud/breakdance/api-reference/System/Net/Http/HttpClient.md) instance using the default AttributeRouting mapping engine, suitable for use in unit tests

#### Syntax

```csharp theme={"dark"}
public static System.Net.Http.HttpClient GetTestableHttpClient()
```

#### Returns

Type: `System.Net.Http.HttpClient`
a new [HttpClient](https://easyaf.nimbleapps.cloud/breakdance/api-reference/System/Net/Http/HttpClient.md) instance.

### &#x20;GetTestableHttpServer

Gets a new [HttpServer](https://learn.microsoft.com/dotnet/api/system.web.http.httpserver) using the default AttributeRouting mapping engine, suitable for use in unit tests.

#### Syntax

```csharp theme={"dark"}
public static System.Web.Http.HttpServer GetTestableHttpServer()
```

#### Returns

Type: `System.Web.Http.HttpServer`
A new [HttpServer](https://learn.microsoft.com/dotnet/api/system.web.http.httpserver) instance.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.