Table of Contents

Class ShouldBeTextChangeAssertExtensions

Namespace
Bunit
Assembly
Bunit.Web.dll

Verification helpers for text.

public static class ShouldBeTextChangeAssertExtensions
Inheritance
ShouldBeTextChangeAssertExtensions
Inherited Members

Methods

ShouldBeAttributeChange(IDiff, string, string, string?)

Verifies that the actualChange diff is a change to the value of the specific attribute (expectedAttrName).

public static void ShouldBeAttributeChange(this IDiff actualChange, string expectedAttrName, string expectedAttrValue, string? userMessage = null)

Parameters

actualChange IDiff

The actual change that has happened.

expectedAttrName string

The expected name of the changed attribute.

expectedAttrValue string

The expected value of the changed attribute.

userMessage string

A custom user message to show when the verification fails.

ShouldBeTextChange(IDiff, INodeList, string?)

Verifies that a diff is a change to a text node.

public static void ShouldBeTextChange(this IDiff actualChange, INodeList expectedChange, string? userMessage = null)

Parameters

actualChange IDiff

The diff to verify.

expectedChange INodeList

The node list containing the expected text change.

userMessage string

A custom error message to show if the verification fails.

ShouldBeTextChange(IDiff, IRenderedFragment, string?)

Verifies that a diff is a change to a text node.

public static void ShouldBeTextChange(this IDiff actualChange, IRenderedFragment expectedChange, string? userMessage = null)

Parameters

actualChange IDiff

The diff to verify.

expectedChange IRenderedFragment

The rendered fragment containing the expected text change.

userMessage string

A custom error message to show if the verification fails.

ShouldBeTextChange(IDiff, string, string?)

Verifies that a diff is a change to a text node.

public static void ShouldBeTextChange(this IDiff actualChange, string expectedChange, string? userMessage = null)

Parameters

actualChange IDiff

The diff to verify.

expectedChange string

The expected text change.

userMessage string

A custom error message to show if the verification fails.

ShouldHaveSingleTextChange(IEnumerable<IDiff>, string, string?)

Verifies that a list of diffs contains only a single change, and that change is a change to a text node.

public static void ShouldHaveSingleTextChange(this IEnumerable<IDiff> diffs, string expectedChange, string? userMessage = null)

Parameters

diffs IEnumerable<IDiff>

The list of diffs to verify against.

expectedChange string

The expected text change.

userMessage string

A custom error message to show if the verification fails.

Progress Telerik

Premium sponsor: Progress Telerik.

Packt

Editorial support provided by Packt.

.NET Foundation

Supported by the .NET Foundation.