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

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

#### Syntax

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

## Methods

### <Icon icon="code-merge" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> AssemblySetup <Badge color="blue">Override</Badge>

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

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

#### Syntax

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

#### Parameters

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

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

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

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

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

### <Icon icon="code-merge" iconType="duotone" color="#419AC5" size={24} className="mr-2" /> TestSetup <Badge color="blue">Override</Badge>

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