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
actualIElementAn element to verify.
expectedIEnumerable<IElement>A list of elements.
userMessagestringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actualelement does not match theexpectedelements.
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
actualIElementAn IElement to verify.
expectedIEnumerable<IRenderedFragment>The expected markup fragments.
userMessagestringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actualelement does not match theexpectedfragments.
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
actualINodeThe node to verify.
expectedINodeListThe expected list of nodes.
userMessagestringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actualmarkup does not match theexpectedmarkup.
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
actualINodeThe node to verify.
expectedIRenderedFragmentThe expected rendered fragment.
userMessagestringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actualmarkup does not match theexpectedmarkup.
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
actualINodeThe markup to verify.
expectedRenderFragmentThe render fragment whose output to compare against.
userMessagestringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actualmarkup does not match theexpectedmarkup.
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
actualINodeThe node to verify.
expectedstringThe expected markup.
userMessagestringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actualmarkup does not match theexpectedmarkup.
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
actualINodeListThe list of nodes to verify.
expectedINodeThe expected node.
userMessagestringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actualmarkup does not match theexpectedmarkup.
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
actualINodeListThe list of nodes to verify.
expectedINodeListThe expected list of nodes.
userMessagestringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actualmarkup does not match theexpectedmarkup.
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
actualINodeListThe list of nodes to verify.
expectedIRenderedFragmentThe expected rendered fragment.
userMessagestringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actualmarkup does not match theexpectedmarkup.
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
actualINodeListThe markup to verify.
expectedRenderFragmentThe render fragment whose output to compare against.
userMessagestringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actualmarkup does not match theexpectedmarkup.
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
actualINodeListThe list of nodes to verify.
expectedstringThe expected markup.
userMessagestringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actualmarkup does not match theexpectedmarkup.
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
actualIRenderedFragmentThe rendered fragment to verify.
expectedIRenderedFragmentThe expected rendered fragment.
userMessagestringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actualmarkup does not match theexpectedmarkup.
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
actualIRenderedFragmentThe rendered fragment to verify.
expectedRenderFragmentThe render fragment whose output to compare against.
userMessagestringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actualmarkup does not match theexpectedmarkup.
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
actualIRenderedFragmentThe rendered fragment to verify.
expectedstringThe expected markup.
userMessagestringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actualmarkup does not match theexpectedmarkup.
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
actualIEnumerable<IElement>A list of elements to verify.
expectedIRenderedFragmentThe expected markup fragment.
userMessagestringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actualelements does not match theexpectedfragment.
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
actualIEnumerable<IElement>A list of elements to verify.
expectedIEnumerable<IRenderedFragment>A list of fragments.
userMessagestringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actualelements does not match theexpectedfragments.
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
actualIEnumerable<IElement>A enumerable of IElements to verify.
expectedstringThe expected markup fragment.
userMessagestringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actualmarkup does not match theexpectedmarkup.
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
actualstringThe markup fragment to verify.
expectedINodeThe expected AngleSharp.Dom.INode.
userMessagestringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actualmarkup does not match theexpectedmarkup.
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
actualstringThe markup fragment to verify.
expectedINodeListThe expected AngleSharp.Dom.INodeList.
userMessagestringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actualmarkup does not match theexpectedmarkup.
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
actualstringThe markup fragment to verify.
expectedIRenderedFragmentThe expected IRenderedFragment.
userMessagestringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actualmarkup does not match theexpectedmarkup.
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
actualstringThe markup fragment to verify.
expectedstringThe expected markup fragment.
userMessagestringA custom user message to display in case the verification fails.
Exceptions
- HtmlEqualException
Thrown when the
actualmarkup does not match theexpectedmarkup.