Class CompareToExtensions
- Namespace
- Bunit
- Assembly
- bunit.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<TComponent>(IRenderedComponent<TComponent>, string)
Compare the rendered markup in the actual IRenderedComponent<TComponent>
with that in the expected markup string.
public static IReadOnlyList<IDiff> CompareTo<TComponent>(this IRenderedComponent<TComponent> actual, string expected) where TComponent : IComponent
Parameters
actualIRenderedComponent<TComponent>Source of rendered markup to check.
expectedstringMarkup to compare with.
Returns
- IReadOnlyList<IDiff>
Any differences found.
Type Parameters
TComponent
CompareTo<TActualComponent, TExpectedComponent>(IRenderedComponent<TActualComponent>, IRenderedComponent<TExpectedComponent>)
Compare the rendered markup in the actual IRenderedComponent<TComponent> to
the rendered markup in the expected IRenderedComponent<TComponent>.
public static IReadOnlyList<IDiff> CompareTo<TActualComponent, TExpectedComponent>(this IRenderedComponent<TActualComponent> actual, IRenderedComponent<TExpectedComponent> expected) where TActualComponent : IComponent where TExpectedComponent : IComponent
Parameters
actualIRenderedComponent<TActualComponent>Source of rendered markup to check.
expectedIRenderedComponent<TExpectedComponent>Source of rendered markup to compare with.
Returns
- IReadOnlyList<IDiff>
Any differences found.
Type Parameters
TActualComponentTExpectedComponent