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
actualChangeIDiffThe actual change that has happened.
expectedAttrNamestringThe expected name of the changed attribute.
expectedAttrValuestringThe expected value of the changed attribute.
userMessagestringA 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
actualChangeIDiffThe diff to verify.
expectedChangeINodeListThe node list containing the expected text change.
userMessagestringA 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
actualChangeIDiffThe diff to verify.
expectedChangeIRenderedFragmentThe rendered fragment containing the expected text change.
userMessagestringA 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
actualChangeIDiffThe diff to verify.
expectedChangestringThe expected text change.
userMessagestringA 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
diffsIEnumerable<IDiff>The list of diffs to verify against.
expectedChangestringThe expected text change.
userMessagestringA custom error message to show if the verification fails.