Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document alternatives for collection order #2063

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 10 additions & 5 deletions Src/FluentAssertions/Collections/StringCollectionAssertions.cs
Expand Up @@ -47,7 +47,8 @@ public StringCollectionAssertions(TCollection actualValue)

/// <summary>
/// Expects the current collection to contain all the same elements in the same order as the collection identified by
/// <paramref name="expected" />. Elements are compared using their <see cref="object.Equals(object)" />.
/// <paramref name="expected" />. Elements are compared using their <see cref="object.Equals(object)" />. To ignore
/// the element order, use <see cref="BeEquivalentTo(string[])"/> instead.
/// </summary>
/// <param name="expected">An <see cref="IEnumerable{T}"/> with the expected elements.</param>
public new AndConstraint<TAssertions> Equal(params string[] expected)
Expand All @@ -57,7 +58,8 @@ public new AndConstraint<TAssertions> Equal(params string[] expected)

/// <summary>
/// Expects the current collection to contain all the same elements in the same order as the collection identified by
/// <paramref name="expected" />. Elements are compared using their <see cref="object.Equals(object)" />.
/// <paramref name="expected" />. Elements are compared using their <see cref="object.Equals(object)" />. To ignore
/// the element order, use <see cref="BeEquivalentTo(IEnumerable{string}, string, object[])"/> instead.
/// </summary>
/// <param name="expected">An <see cref="IEnumerable{T}"/> with the expected elements.</param>
public AndConstraint<TAssertions> Equal(IEnumerable<string> expected)
Expand All @@ -69,7 +71,8 @@ public AndConstraint<TAssertions> Equal(IEnumerable<string> expected)
/// Asserts that a collection of string is equivalent to another collection of strings.
/// </summary>
/// <remarks>
/// The two collections are equivalent when they both contain the same strings in any order.
/// The two collections are equivalent when they both contain the same strings in any order. To assert that the elements
/// are in the same order, use <see cref="Equal(string[])"/> instead.
/// </remarks>
public AndConstraint<TAssertions> BeEquivalentTo(params string[] expectation)
{
Expand All @@ -80,7 +83,8 @@ public AndConstraint<TAssertions> BeEquivalentTo(params string[] expectation)
/// Asserts that a collection of objects is equivalent to another collection of objects.
/// </summary>
/// <remarks>
/// The two collections are equivalent when they both contain the same strings in any order.
/// The two collections are equivalent when they both contain the same strings in any order. To assert that the elements
/// are in the same order, use <see cref="Equal(IEnumerable{string})"/> instead.
/// </remarks>
/// <param name="expectation">An <see cref="IEnumerable{String}"/> with the expected elements.</param>
/// <param name="because">
Expand All @@ -99,7 +103,8 @@ public AndConstraint<TAssertions> BeEquivalentTo(IEnumerable<string> expectation
/// Asserts that a collection of objects is equivalent to another collection of objects.
/// </summary>
/// <remarks>
/// The two collections are equivalent when they both contain the same strings in any order.
/// The two collections are equivalent when they both contain the same strings in any order. To assert that the elements
/// are in the same order, use <see cref="Equal(string[])"/> instead.
/// </remarks>
/// <param name="expectation">An <see cref="IEnumerable{String}"/> with the expected elements.</param>
/// <param name="config">
Expand Down