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

Fix the typo in the title for NUnit2014 #751

Open
Bartleby2718 opened this issue Jun 2, 2024 · 1 comment
Open

Fix the typo in the title for NUnit2014 #751

Bartleby2718 opened this issue Jun 2, 2024 · 1 comment

Comments

@Bartleby2718
Copy link
Contributor

See the conversation in #749 for context.

Looking at https://github.com/nunit/nunit.analyzers/blob/master/src/nunit.analyzers/Constants/AnalyzerIdentifiers.cs#L57

        internal const string CollectionContainsConstraintUsage = "NUnit2014";

it does seems like SomeItemsConstraint is a typo and therefore should be fixed to something like CollectionContainsConstraint in the following places: https://github.com/search?q=repo%3Anunit%2Fnunit.analyzers%20%22Use%20SomeItemsConstraint%20for%20better%20assertion%20messages%20in%20case%20of%20failure%22&type=code

Since this is a minor typo fix, you can likely bundle it with another such issue: #714.

@manfred-brands
Copy link
Member

It is not a typo, Does.Contain returns an SomeItemsConstraint:

/// <summary>
/// Returns a new <see cref="SomeItemsConstraint"/> checking for the
/// presence of a particular object in the collection.
/// </summary>
public static SomeItemsConstraint Contain(object? expected) =>
    new(new EqualConstraint(expected));

Unfortunately NUnit has constrain classes and convenience methods to create them and the naming of both might not align.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants