Class MarkupMatchesAssertExtensions
Assert helpers for comparing markup.
Inheritance
Inherited Members
Namespace: Bunit
Assembly: Bunit.Web.dll
Syntax
public static class MarkupMatchesAssertExtensions
Methods
| Improve this Doc View SourceMarkupMatches(INode, INodeList, String)
Verifies that the actual
AngleSharp.Dom.INode matches
the expected
AngleSharp.Dom.INodeList, using the HtmlComparer
type.
Declaration
public static void MarkupMatches(this INode actual, INodeList expected, string userMessage = null)
Parameters
Type | Name | Description |
---|---|---|
AngleSharp.Dom.INode | actual | The node to verify. |
AngleSharp.Dom.INodeList | expected | The expected list of nodes. |
System.String | userMessage | A custom user message to display in case the verification fails. |
Exceptions
Type | Condition |
---|---|
HtmlEqualException | Thrown when the |
MarkupMatches(INode, IRenderedFragment, String)
Verifies that the actual
AngleSharp.Dom.INode matches
the rendered markup from the expected
IRenderedFragment, using the HtmlComparer
type.
Declaration
public static void MarkupMatches(this INode actual, IRenderedFragment expected, string userMessage = null)
Parameters
Type | Name | Description |
---|---|---|
AngleSharp.Dom.INode | actual | The node to verify. |
IRenderedFragment | expected | The expected rendered fragment. |
System.String | userMessage | A custom user message to display in case the verification fails. |
Exceptions
Type | Condition |
---|---|
HtmlEqualException | Thrown when the |
MarkupMatches(INode, RenderFragment, String)
Verifies that the markup from the actual
matches
the rendered markup from the expected
Microsoft.AspNetCore.Components.RenderFragment, using the HtmlComparer type.
Declaration
public static void MarkupMatches(this INode actual, RenderFragment expected, string userMessage = null)
Parameters
Type | Name | Description |
---|---|---|
AngleSharp.Dom.INode | actual | The markup to verify. |
Microsoft.AspNetCore.Components.RenderFragment | expected | The render fragment whose output to compare against. |
System.String | userMessage | A custom user message to display in case the verification fails. |
Exceptions
Type | Condition |
---|---|
HtmlEqualException | Thrown when the |
MarkupMatches(INode, String, String)
Verifies that the actual
AngleSharp.Dom.INode matches
the expected
markup, using the HtmlComparer
type.
Declaration
public static void MarkupMatches(this INode actual, string expected, string userMessage = null)
Parameters
Type | Name | Description |
---|---|---|
AngleSharp.Dom.INode | actual | The node to verify. |
System.String | expected | The expected markup. |
System.String | userMessage | A custom user message to display in case the verification fails. |
Exceptions
Type | Condition |
---|---|
HtmlEqualException | Thrown when the |
MarkupMatches(INodeList, INode, String)
Verifies that the actual
AngleSharp.Dom.INodeList matches
the expected
AngleSharp.Dom.INode, using the HtmlComparer
type.
Declaration
public static void MarkupMatches(this INodeList actual, INode expected, string userMessage = null)
Parameters
Type | Name | Description |
---|---|---|
AngleSharp.Dom.INodeList | actual | The list of nodes to verify. |
AngleSharp.Dom.INode | expected | The expected node. |
System.String | userMessage | A custom user message to display in case the verification fails. |
Exceptions
Type | Condition |
---|---|
HtmlEqualException | Thrown when the |
MarkupMatches(INodeList, INodeList, String)
Verifies that the actual
AngleSharp.Dom.INodeList matches
the expected
AngleSharp.Dom.INodeList, using the HtmlComparer
type.
Declaration
public static void MarkupMatches(this INodeList actual, INodeList expected, string userMessage = null)
Parameters
Type | Name | Description |
---|---|---|
AngleSharp.Dom.INodeList | actual | The list of nodes to verify. |
AngleSharp.Dom.INodeList | expected | The expected list of nodes. |
System.String | userMessage | A custom user message to display in case the verification fails. |
Exceptions
Type | Condition |
---|---|
HtmlEqualException | Thrown when the |
MarkupMatches(INodeList, IRenderedFragment, String)
Verifies that the actual
AngleSharp.Dom.INodeList matches
the rendered markup from the expected
IRenderedFragment, using the HtmlComparer
type.
Declaration
public static void MarkupMatches(this INodeList actual, IRenderedFragment expected, string userMessage = null)
Parameters
Type | Name | Description |
---|---|---|
AngleSharp.Dom.INodeList | actual | The list of nodes to verify. |
IRenderedFragment | expected | The expected rendered fragment. |
System.String | userMessage | A custom user message to display in case the verification fails. |
Exceptions
Type | Condition |
---|---|
HtmlEqualException | Thrown when the |
MarkupMatches(INodeList, RenderFragment, String)
Verifies that the markup from the actual
matches
the rendered markup from the expected
Microsoft.AspNetCore.Components.RenderFragment, using the HtmlComparer type.
Declaration
public static void MarkupMatches(this INodeList actual, RenderFragment expected, string userMessage = null)
Parameters
Type | Name | Description |
---|---|---|
AngleSharp.Dom.INodeList | actual | The markup to verify. |
Microsoft.AspNetCore.Components.RenderFragment | expected | The render fragment whose output to compare against. |
System.String | userMessage | A custom user message to display in case the verification fails. |
Exceptions
Type | Condition |
---|---|
HtmlEqualException | Thrown when the |
MarkupMatches(INodeList, String, String)
Verifies that the actual
AngleSharp.Dom.INodeList matches
the expected
markup, using the HtmlComparer
type.
Declaration
public static void MarkupMatches(this INodeList actual, string expected, string userMessage = null)
Parameters
Type | Name | Description |
---|---|---|
AngleSharp.Dom.INodeList | actual | The list of nodes to verify. |
System.String | expected | The expected markup. |
System.String | userMessage | A custom user message to display in case the verification fails. |
Exceptions
Type | Condition |
---|---|
HtmlEqualException | Thrown when the |
MarkupMatches(IRenderedFragment, IRenderedFragment, String)
Verifies that the rendered markup from the actual
IRenderedFragment matches
the rendered markup from the expected
IRenderedFragment, using the HtmlComparer type.
Declaration
public static void MarkupMatches(this IRenderedFragment actual, IRenderedFragment expected, string userMessage = null)
Parameters
Type | Name | Description |
---|---|---|
IRenderedFragment | actual | The rendered fragment to verify. |
IRenderedFragment | expected | The expected rendered fragment. |
System.String | userMessage | A custom user message to display in case the verification fails. |
Exceptions
Type | Condition |
---|---|
HtmlEqualException | Thrown when the |
MarkupMatches(IRenderedFragment, RenderFragment, String)
Verifies that the rendered markup from the actual
IRenderedFragment matches
the rendered markup from the expected
Microsoft.AspNetCore.Components.RenderFragment, using the HtmlComparer type.
Declaration
public static void MarkupMatches(this IRenderedFragment actual, RenderFragment expected, string userMessage = null)
Parameters
Type | Name | Description |
---|---|---|
IRenderedFragment | actual | The rendered fragment to verify. |
Microsoft.AspNetCore.Components.RenderFragment | expected | The render fragment whose output to compare against. |
System.String | userMessage | A custom user message to display in case the verification fails. |
Exceptions
Type | Condition |
---|---|
HtmlEqualException | Thrown when the |
MarkupMatches(IRenderedFragment, String, String)
Verifies that the rendered markup from the actual
IRenderedFragment matches
the expected
markup, using the HtmlComparer type.
Declaration
public static void MarkupMatches(this IRenderedFragment actual, string expected, string userMessage = null)
Parameters
Type | Name | Description |
---|---|---|
IRenderedFragment | actual | The rendered fragment to verify. |
System.String | expected | The expected markup. |
System.String | userMessage | A custom user message to display in case the verification fails. |
Exceptions
Type | Condition |
---|---|
HtmlEqualException | Thrown when the |
MarkupMatches(String, INode, String)
Verifies that the rendered markup from the actual
markup fragment matches
the expected
AngleSharp.Dom.INode, using the HtmlComparer type.
Declaration
public static void MarkupMatches(this string actual, INode expected, string userMessage = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | actual | The markup fragment to verify. |
AngleSharp.Dom.INode | expected | The expected AngleSharp.Dom.INode. |
System.String | userMessage | A custom user message to display in case the verification fails. |
Exceptions
Type | Condition |
---|---|
HtmlEqualException | Thrown when the |
MarkupMatches(String, INodeList, String)
Verifies that the rendered markup from the actual
markup fragment matches
the expected
AngleSharp.Dom.INodeList, using the HtmlComparer type.
Declaration
public static void MarkupMatches(this string actual, INodeList expected, string userMessage = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | actual | The markup fragment to verify. |
AngleSharp.Dom.INodeList | expected | The expected AngleSharp.Dom.INodeList. |
System.String | userMessage | A custom user message to display in case the verification fails. |
Exceptions
Type | Condition |
---|---|
HtmlEqualException | Thrown when the |
MarkupMatches(String, IRenderedFragment, String)
Verifies that the rendered markup from the actual
markup fragment matches
the expected
IRenderedFragment, using the HtmlComparer type.
Declaration
public static void MarkupMatches(this string actual, IRenderedFragment expected, string userMessage = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | actual | The markup fragment to verify. |
IRenderedFragment | expected | The expected IRenderedFragment. |
System.String | userMessage | A custom user message to display in case the verification fails. |
Exceptions
Type | Condition |
---|---|
HtmlEqualException | Thrown when the |
MarkupMatches(String, String, String)
Verifies that the rendered markup from the actual
markup fragment matches
the expected
markup fragment, using the HtmlComparer type.
Declaration
public static void MarkupMatches(this string actual, string expected, string userMessage = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | actual | The markup fragment to verify. |
System.String | expected | The expected markup fragment. |
System.String | userMessage | A custom user message to display in case the verification fails. |
Exceptions
Type | Condition |
---|---|
HtmlEqualException | Thrown when the |