Class CompareToExtensions
- Namespace
- Bunit
- Assembly
- Bunit.Web.dll
Extension methods that allows different rendered fragments to be compared to others or strings.
public static class CompareToExtensions
- Inheritance
-
CompareToExtensions
- Inherited Members
Methods
CompareTo(INode, INodeList)
Compares an actual
AngleSharp.Dom.INode with an expected
AngleSharp.Dom.INodeList.
public static IReadOnlyList<IDiff> CompareTo(this INode actual, INodeList expected)
Parameters
actual
INodeThe node to check.
expected
INodeListThe node list to compare with.
Returns
- IReadOnlyList<IDiff>
Any differences found.
CompareTo(INodeList, INode)
Compares an actual
AngleSharp.Dom.INodeList with an expected
AngleSharp.Dom.INode.
public static IReadOnlyList<IDiff> CompareTo(this INodeList actual, INode expected)
Parameters
actual
INodeListThe node list to check.
expected
INodeThe node to compare with.
Returns
- IReadOnlyList<IDiff>
Any differences found.
CompareTo(INodeList, INodeList)
Compares an actual
AngleSharp.Dom.INodeList with an expected
AngleSharp.Dom.INodeList.
public static IReadOnlyList<IDiff> CompareTo(this INodeList actual, INodeList expected)
Parameters
actual
INodeListThe node list to check.
expected
INodeListThe node list to compare with.
Returns
- IReadOnlyList<IDiff>
Any differences found.
CompareTo(IRenderedFragment, IRenderedFragment)
Compare the rendered markup in the actual
IRenderedFragmentBase to
the rendered markup in the expected
IRenderedFragmentBase.
public static IReadOnlyList<IDiff> CompareTo(this IRenderedFragment actual, IRenderedFragment expected)
Parameters
actual
IRenderedFragmentSource of rendered markup to check.
expected
IRenderedFragmentSource of rendered markup to compare with.
Returns
- IReadOnlyList<IDiff>
Any differences found.
CompareTo(IRenderedFragment, string)
Compare the rendered markup in the actual
IRenderedFragmentBase
with that in the expected
markup string.
public static IReadOnlyList<IDiff> CompareTo(this IRenderedFragment actual, string expected)
Parameters
actual
IRenderedFragmentSource of rendered markup to check.
expected
stringMarkup to compare with.
Returns
- IReadOnlyList<IDiff>
Any differences found.