> ## 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.

# BlazorEssentialsTestBase

## Definition

**Assembly:** CloudNimble.BlazorEssentials.Breakdance.dll

**Namespace:** CloudNimble.BlazorEssentials.Breakdance

**Inheritance:** CloudNimble.Breakdance.Blazor.BlazorBreakdanceTestBase

## Syntax

```csharp theme={"dark"}
CloudNimble.BlazorEssentials.Breakdance.BlazorEssentialsTestBase<TConfiguration, TAppState>
```

## Type Parameters

* `TConfiguration` -
* `TAppState` -

## Constructors

### &#x20;.ctor

#### Syntax

```csharp theme={"dark"}
public BlazorEssentialsTestBase()
```

## Methods

### &#x20;AssemblySetup Override

DO NOT USE THIS METHOD. Throws a [NotSupportedException](https://learn.microsoft.com/dotnet/api/system.notsupportedexception) when called. You must call `String)`
or `TestSetup` instead.

#### Syntax

```csharp theme={"dark"}
public override void AssemblySetup()
```

#### Exceptions

| Exception | Description |
| - | - |
| `NotSupportedException` | Throws a NotSupportedException when called. |

### &#x20;ClassSetup

#### Syntax

```csharp theme={"dark"}
public void ClassSetup(string configSectionName)
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `configSectionName` | `string` | - |

### &#x20;ClassSetup

#### Syntax

```csharp theme={"dark"}
public void ClassSetup<TMessageHandler>(string configSectionName, string environment = "Development", string baseAddress = "https://localhost") where TMessageHandler : System.Net.Http.DelegatingHandler
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `configSectionName` | `string` | - |
| `environment` | `string` | - |
| `baseAddress` | `string` | - |

#### Type Parameters

* `TMessageHandler` -

### &#x20;ClassSetup

#### Syntax

```csharp theme={"dark"}
public void ClassSetup<TMessageHandler>(string configSectionName, CloudNimble.EasyAF.Core.HttpHandlerMode httpHandlerMode, string environment = "Development", string baseAddress = "https://localhost") where TMessageHandler : System.Net.Http.DelegatingHandler
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `configSectionName` | `string` | - |
| `httpHandlerMode` | `CloudNimble.EasyAF.Core.HttpHandlerMode` | - |
| `environment` | `string` | - |
| `baseAddress` | `string` | - |

#### Type Parameters

* `TMessageHandler` -

### &#x20;TestSetup

Configures the BlazorEssentials services into the BUnitTestContext IServiceProvider for the currently-executing test only.

#### Syntax

```csharp theme={"dark"}
public void TestSetup(string configSectionName, string environment = "Development", string baseAddress = "https://localhost")
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `configSectionName` | `string` | - |
| `environment` | `string` | - |
| `baseAddress` | `string` | - |

#### Remarks

RWM: These methods exist because bUnit is configured per-test, and the BlazorEssentials configuration can change on a per-test basis.
bUnit will resolve from its own container first, then fall back to the TestHost's ServiceProvider if not found. This methods puts a new configuration in place
instead, to be used only for the currently-executing test.

### &#x20;TestSetup

Configures the BlazorEssentials services into the BUnitTestContext IServiceProvider for the currently-executing test only.

#### Syntax

```csharp theme={"dark"}
public void TestSetup<TMessageHandler>(string configSectionName, CloudNimble.EasyAF.Core.HttpHandlerMode httpHandlerMode = 2, string environment = "Development", string baseAddress = "https://localhost") where TMessageHandler : System.Net.Http.DelegatingHandler
```

#### Parameters

| Name | Type | Description |
| - | - | - |
| `configSectionName` | `string` | - |
| `httpHandlerMode` | `CloudNimble.EasyAF.Core.HttpHandlerMode` | - |
| `environment` | `string` | - |
| `baseAddress` | `string` | - |

#### Type Parameters

* `TMessageHandler` -

#### Remarks

RWM: These methods exist because bUnit is configured per-test, and the BlazorEssentials configuration can change on a per-test basis.
bUnit will resolve from its own container first, then fall back to the TestHost's ServiceProvider if not found. This methods puts a new configuration in place
instead, to be used only for the currently-executing test.

### &#x20;TestSetup Override

DO NOT USE THIS METHOD. Throws a [NotSupportedException](https://learn.microsoft.com/dotnet/api/system.notsupportedexception) when called. You must call `String)`
or `TestSetup` instead.

#### Syntax

```csharp theme={"dark"}
public override void TestSetup()
```

#### Exceptions

| Exception | Description |
| - | - |
| `NotSupportedException` | Throws a NotSupportedException when called. |


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