Table of Contents

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 INode

The node to check.

expected INodeList

The 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 INodeList

The node list to check.

expected INode

The 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 INodeList

The node list to check.

expected INodeList

The 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 IRenderedFragment

Source of rendered markup to check.

expected IRenderedFragment

Source 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 IRenderedFragment

Source of rendered markup to check.

expected string

Markup to compare with.

Returns

IReadOnlyList<IDiff>

Any differences found.

Progress Telerik

Premium sponsor: Progress Telerik.

Packt

Editorial support provided by Packt.

.NET Foundation

Supported by the .NET Foundation.