nunit / nunit/docs

CollectionAssert.Contains has misleading parameters and/or output

Open
#672 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:framework pri:p1 type:update
Dominant language
Dockerfile
Stars
600
Forks
158
Avg merge
16h 8m
Merged PRs (30d)
21

Description

Issue https://github.com/nunit/nunit/issues/4185 was filed against the framework which, after investigation, we determined that the actual parameter on the set-based CollectionAssert methods is actually treated as the expected value, leading to some confusion about the failure message output. Changing the parameter name carries a risk of breaking anyone passing values using named parameters, which isn't worth the risk here so a decision was made to tackle it in documentation instead.

This ticket is to track the documentation update to clarify this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading framework issue #4185 and the documentation for the set-based CollectionAssert methods, especially Contains. Clarify that the actual parameter is treated as the expected value and explain how this affects failure-message output; the documentation should make the parameter roles and resulting message unambiguous.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.