/// <summary> /// Verifies that the <paramref name="actual"/> <see cref="INodeList"/> matches /// the rendered markup from the <paramref name="expected"/> <see cref="IRenderedFragment"/>, using the <see cref="HtmlComparer"/> /// type. /// </summary> /// <exception cref="HtmlEqualException">Thrown when the <paramref name="actual"/> markup does not match the <paramref name="expected"/> markup.</exception> /// <param name="actual">The list of nodes to verify.</param> /// <param name="expected">The expected rendered fragment.</param> /// <param name="userMessage">A custom user message to display in case the verification fails.</param> public static void MarkupMatches(this INodeList actual, IRenderedFragment expected, string?userMessage = null) { if (actual is null) { throw new ArgumentNullException(nameof(actual)); } if (expected is null) { throw new ArgumentNullException(nameof(expected)); } actual.MarkupMatches(expected.GetNodes(), userMessage); }