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

Remove support for non-generic collections #1529

Merged
merged 4 commits into from
Apr 27, 2021
Merged
Show file tree
Hide file tree
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
10 changes: 0 additions & 10 deletions Src/FluentAssertions/AssertionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -277,16 +277,6 @@ public static NullableGuidAssertions Should(this Guid? actualValue)
return new NullableGuidAssertions(actualValue);
}

/// <summary>
/// Returns an <see cref="NonGenericCollectionAssertions"/> object that can be used to assert the
/// current <see cref="IEnumerable"/>.
/// </summary>
[Pure]
public static NonGenericCollectionAssertions Should(this IEnumerable actualValue)
{
return new NonGenericCollectionAssertions(actualValue);
}

/// <summary>
/// Returns an <see cref="GenericCollectionAssertions{T}"/> object that can be used to assert the
/// current <see cref="IEnumerable{T}"/>.
Expand Down
1,947 changes: 0 additions & 1,947 deletions Src/FluentAssertions/Collections/CollectionAssertions.cs

This file was deleted.

3,077 changes: 2,822 additions & 255 deletions Src/FluentAssertions/Collections/GenericCollectionAssertions.cs

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ public AndConstraint<TAssertions> Contain(params KeyValuePair<TKey, TValue>[] ex
/// <param name="becauseArgs">
/// Zero or more objects to format using the placeholders in <paramref name="because" />.
/// </param>
public AndConstraint<TAssertions> Contain(IEnumerable<KeyValuePair<TKey, TValue>> expected,
public new AndConstraint<TAssertions> Contain(IEnumerable<KeyValuePair<TKey, TValue>> expected,
string because = "", params object[] becauseArgs)
{
Guard.ThrowIfArgumentIsNull(expected, nameof(expected), "Cannot compare dictionary with <null>.");
Expand Down Expand Up @@ -809,7 +809,7 @@ public AndConstraint<TAssertions> NotContain(params KeyValuePair<TKey, TValue>[]
/// <param name="becauseArgs">
/// Zero or more objects to format using the placeholders in <paramref name="because" />.
/// </param>
public AndConstraint<TAssertions> NotContain(IEnumerable<KeyValuePair<TKey, TValue>> items,
public new AndConstraint<TAssertions> NotContain(IEnumerable<KeyValuePair<TKey, TValue>> items,
string because = "", params object[] becauseArgs)
{
Guard.ThrowIfArgumentIsNull(items, nameof(items), "Cannot compare dictionary with <null>.");
Expand Down
312 changes: 0 additions & 312 deletions Src/FluentAssertions/Collections/NonGenericCollectionAssertions.cs

This file was deleted.