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
actualINodeThe node to check.
expectedINodeListThe 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
actualINodeListThe node list to check.
expectedINodeThe 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
actualINodeListThe node list to check.
expectedINodeListThe 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
actualIRenderedFragmentSource of rendered markup to check.
expectedIRenderedFragmentSource 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
actualIRenderedFragmentSource of rendered markup to check.
expectedstringMarkup to compare with.
Returns
- IReadOnlyList<IDiff>
Any differences found.