Class MarkupMatchesAssertExtensions
- Namespace
- Bunit
- Assembly
- Bunit.Web.dll
Assert helpers for comparing markup.
public static class MarkupMatchesAssertExtensions
- Inheritance
-
MarkupMatchesAssertExtensions
- Inherited Members
Methods
MarkupMatches(IElement, IEnumerable<IElement>, string?)
Verifies that the rendered markup from the actual
elements matches
the expected
elements, using the HtmlComparer type.
[AssertionMethod]
public static void MarkupMatches(this IElement actual, IEnumerable<IElement> expected, string? userMessage = null)
Parameters
actual
IElementAn element to verify.
expected
IEnumerable<IElement>A list of elements.
userMessage
stringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actual
element does not match theexpected
elements.
MarkupMatches(IElement, IEnumerable<IRenderedFragment>, string?)
Verifies that the rendered markup from the actual
element matches
the expected
fragments, using the HtmlComparer type.
[AssertionMethod]
public static void MarkupMatches(this IElement actual, IEnumerable<IRenderedFragment> expected, string? userMessage = null)
Parameters
actual
IElementAn IElement to verify.
expected
IEnumerable<IRenderedFragment>The expected markup fragments.
userMessage
stringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actual
element does not match theexpected
fragments.
MarkupMatches(INode, INodeList, string?)
Verifies that the actual
AngleSharp.Dom.INode matches
the expected
AngleSharp.Dom.INodeList, using the HtmlComparer
type.
[AssertionMethod]
public static void MarkupMatches(this INode actual, INodeList expected, string? userMessage = null)
Parameters
actual
INodeThe node to verify.
expected
INodeListThe expected list of nodes.
userMessage
stringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actual
markup does not match theexpected
markup.
MarkupMatches(INode, IRenderedFragment, string?)
Verifies that the actual
AngleSharp.Dom.INode matches
the rendered markup from the expected
IRenderedFragment, using the HtmlComparer
type.
[AssertionMethod]
public static void MarkupMatches(this INode actual, IRenderedFragment expected, string? userMessage = null)
Parameters
actual
INodeThe node to verify.
expected
IRenderedFragmentThe expected rendered fragment.
userMessage
stringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actual
markup does not match theexpected
markup.
MarkupMatches(INode, RenderFragment, string?)
Verifies that the markup from the actual
matches
the rendered markup from the expected
RenderFragment, using the HtmlComparer type.
[AssertionMethod]
public static void MarkupMatches(this INode actual, RenderFragment expected, string? userMessage = null)
Parameters
actual
INodeThe markup to verify.
expected
RenderFragmentThe render fragment whose output to compare against.
userMessage
stringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actual
markup does not match theexpected
markup.
MarkupMatches(INode, string, string?)
Verifies that the actual
AngleSharp.Dom.INode matches
the expected
markup, using the HtmlComparer
type.
[AssertionMethod]
public static void MarkupMatches(this INode actual, string expected, string? userMessage = null)
Parameters
actual
INodeThe node to verify.
expected
stringThe expected markup.
userMessage
stringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actual
markup does not match theexpected
markup.
MarkupMatches(INodeList, INode, string?)
Verifies that the actual
AngleSharp.Dom.INodeList matches
the expected
AngleSharp.Dom.INode, using the HtmlComparer
type.
[AssertionMethod]
public static void MarkupMatches(this INodeList actual, INode expected, string? userMessage = null)
Parameters
actual
INodeListThe list of nodes to verify.
expected
INodeThe expected node.
userMessage
stringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actual
markup does not match theexpected
markup.
MarkupMatches(INodeList, INodeList, string?)
Verifies that the actual
AngleSharp.Dom.INodeList matches
the expected
AngleSharp.Dom.INodeList, using the HtmlComparer
type.
[AssertionMethod]
public static void MarkupMatches(this INodeList actual, INodeList expected, string? userMessage = null)
Parameters
actual
INodeListThe list of nodes to verify.
expected
INodeListThe expected list of nodes.
userMessage
stringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actual
markup does not match theexpected
markup.
MarkupMatches(INodeList, IRenderedFragment, string?)
Verifies that the actual
AngleSharp.Dom.INodeList matches
the rendered markup from the expected
IRenderedFragment, using the HtmlComparer
type.
[AssertionMethod]
public static void MarkupMatches(this INodeList actual, IRenderedFragment expected, string? userMessage = null)
Parameters
actual
INodeListThe list of nodes to verify.
expected
IRenderedFragmentThe expected rendered fragment.
userMessage
stringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actual
markup does not match theexpected
markup.
MarkupMatches(INodeList, RenderFragment, string?)
Verifies that the markup from the actual
matches
the rendered markup from the expected
RenderFragment, using the HtmlComparer type.
[AssertionMethod]
public static void MarkupMatches(this INodeList actual, RenderFragment expected, string? userMessage = null)
Parameters
actual
INodeListThe markup to verify.
expected
RenderFragmentThe render fragment whose output to compare against.
userMessage
stringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actual
markup does not match theexpected
markup.
MarkupMatches(INodeList, string, string?)
Verifies that the actual
AngleSharp.Dom.INodeList matches
the expected
markup, using the HtmlComparer
type.
[AssertionMethod]
public static void MarkupMatches(this INodeList actual, string expected, string? userMessage = null)
Parameters
actual
INodeListThe list of nodes to verify.
expected
stringThe expected markup.
userMessage
stringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actual
markup does not match theexpected
markup.
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.
[AssertionMethod]
public static void MarkupMatches(this IRenderedFragment actual, IRenderedFragment expected, string? userMessage = null)
Parameters
actual
IRenderedFragmentThe rendered fragment to verify.
expected
IRenderedFragmentThe expected rendered fragment.
userMessage
stringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actual
markup does not match theexpected
markup.
MarkupMatches(IRenderedFragment, RenderFragment, string?)
Verifies that the rendered markup from the actual
IRenderedFragment matches
the rendered markup from the expected
RenderFragment, using the HtmlComparer type.
[AssertionMethod]
public static void MarkupMatches(this IRenderedFragment actual, RenderFragment expected, string? userMessage = null)
Parameters
actual
IRenderedFragmentThe rendered fragment to verify.
expected
RenderFragmentThe render fragment whose output to compare against.
userMessage
stringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actual
markup does not match theexpected
markup.
MarkupMatches(IRenderedFragment, string, string?)
Verifies that the rendered markup from the actual
IRenderedFragment matches
the expected
markup, using the HtmlComparer type.
[AssertionMethod]
public static void MarkupMatches(this IRenderedFragment actual, string expected, string? userMessage = null)
Parameters
actual
IRenderedFragmentThe rendered fragment to verify.
expected
stringThe expected markup.
userMessage
stringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actual
markup does not match theexpected
markup.
MarkupMatches(IEnumerable<IElement>, IRenderedFragment, string?)
Verifies that the rendered markup from the actual
elements matches
the expected
fragment, using the HtmlComparer type.
[AssertionMethod]
public static void MarkupMatches(this IEnumerable<IElement> actual, IRenderedFragment expected, string? userMessage = null)
Parameters
actual
IEnumerable<IElement>A list of elements to verify.
expected
IRenderedFragmentThe expected markup fragment.
userMessage
stringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actual
elements does not match theexpected
fragment.
MarkupMatches(IEnumerable<IElement>, IEnumerable<IRenderedFragment>, string?)
Verifies that the rendered markup from the actual
elements matches
the expected
fragments, using the HtmlComparer type.
[AssertionMethod]
public static void MarkupMatches(this IEnumerable<IElement> actual, IEnumerable<IRenderedFragment> expected, string? userMessage = null)
Parameters
actual
IEnumerable<IElement>A list of elements to verify.
expected
IEnumerable<IRenderedFragment>A list of fragments.
userMessage
stringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actual
elements does not match theexpected
fragments.
MarkupMatches(IEnumerable<IElement>, string, string?)
Verifies that the rendered markup from the actual
elements
the expected
markup fragment, using the HtmlComparer type.
[AssertionMethod]
public static void MarkupMatches(this IEnumerable<IElement> actual, string expected, string? userMessage = null)
Parameters
actual
IEnumerable<IElement>A enumerable of IElements to verify.
expected
stringThe expected markup fragment.
userMessage
stringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actual
markup does not match theexpected
markup.
MarkupMatches(string, INode, string?)
Verifies that the rendered markup from the actual
markup fragment matches
the expected
AngleSharp.Dom.INode, using the HtmlComparer type.
[AssertionMethod]
public static void MarkupMatches(this string actual, INode expected, string? userMessage = null)
Parameters
actual
stringThe markup fragment to verify.
expected
INodeThe expected AngleSharp.Dom.INode.
userMessage
stringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actual
markup does not match theexpected
markup.
MarkupMatches(string, INodeList, string?)
Verifies that the rendered markup from the actual
markup fragment matches
the expected
AngleSharp.Dom.INodeList, using the HtmlComparer type.
[AssertionMethod]
public static void MarkupMatches(this string actual, INodeList expected, string? userMessage = null)
Parameters
actual
stringThe markup fragment to verify.
expected
INodeListThe expected AngleSharp.Dom.INodeList.
userMessage
stringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actual
markup does not match theexpected
markup.
MarkupMatches(string, IRenderedFragment, string?)
Verifies that the rendered markup from the actual
markup fragment matches
the expected
IRenderedFragment, using the HtmlComparer type.
[AssertionMethod]
public static void MarkupMatches(this string actual, IRenderedFragment expected, string? userMessage = null)
Parameters
actual
stringThe markup fragment to verify.
expected
IRenderedFragmentThe expected IRenderedFragment.
userMessage
stringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actual
markup does not match theexpected
markup.
MarkupMatches(string, string, string?)
Verifies that the rendered markup from the actual
markup fragment matches
the expected
markup fragment, using the HtmlComparer type.
[AssertionMethod]
public static void MarkupMatches(this string actual, string expected, string? userMessage = null)
Parameters
actual
stringThe markup fragment to verify.
expected
stringThe expected markup fragment.
userMessage
stringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actual
markup does not match theexpected
markup.