> ## Documentation Index
> Fetch the complete documentation index at: https://easyaf.dev/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

### <Icon icon="thumbtack" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> GetTestableConfiguration

Gets a new [HttpConfiguration](/breakdance/api-reference/System/Web/Http/HttpConfiguration) 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](/breakdance/api-reference/System/Web/Http/HttpConfiguration) instance.

### <Icon icon="thumbtack" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> GetTestableHttpClient

Gets a new [HttpClient](/breakdance/api-reference/System/Net/Http/HttpClient) 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](/breakdance/api-reference/System/Net/Http/HttpClient) instance.

### <Icon icon="thumbtack" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> 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.
