Skip to main content

Definition

Assembly: CloudNimble.BlazorEssentials.Breakdance.dll Namespace: CloudNimble.BlazorEssentials.Breakdance Inheritance: CloudNimble.Breakdance.Blazor.BlazorBreakdanceTestBase

Syntax

CloudNimble.BlazorEssentials.Breakdance.BlazorEssentialsTestBase<TConfiguration, TAppState>

Type Parameters

  • TConfiguration -
  • TAppState -

Constructors

.ctor

Syntax

public BlazorEssentialsTestBase()

Methods

AssemblySetup Override

DO NOT USE THIS METHOD. Throws a NotSupportedException when called. You must call String) or TestSetup instead.

Syntax

public override void AssemblySetup()

Exceptions

ExceptionDescription
NotSupportedExceptionThrows a NotSupportedException when called.

ClassSetup

Syntax

public void ClassSetup(string configSectionName)

Parameters

NameTypeDescription
configSectionNamestring-

ClassSetup

Syntax

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

Parameters

NameTypeDescription
configSectionNamestring-
environmentstring-
baseAddressstring-

Type Parameters

  • TMessageHandler -

ClassSetup

Syntax

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

NameTypeDescription
configSectionNamestring-
httpHandlerModeCloudNimble.EasyAF.Core.HttpHandlerMode-
environmentstring-
baseAddressstring-

Type Parameters

  • TMessageHandler -

TestSetup

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

Syntax

public void TestSetup(string configSectionName, string environment = "Development", string baseAddress = "https://localhost")

Parameters

NameTypeDescription
configSectionNamestring-
environmentstring-
baseAddressstring-

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.

TestSetup

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

Syntax

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

NameTypeDescription
configSectionNamestring-
httpHandlerModeCloudNimble.EasyAF.Core.HttpHandlerMode-
environmentstring-
baseAddressstring-

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.

TestSetup Override

DO NOT USE THIS METHOD. Throws a NotSupportedException when called. You must call String) or TestSetup instead.

Syntax

public override void TestSetup()

Exceptions

ExceptionDescription
NotSupportedExceptionThrows a NotSupportedException when called.