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

Improve output for expected argument matchers #806

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on May 5, 2024

  1. Improve output for expected argument matchers

    - Add IDescribeSpecification to allow custom arg matchers to provide
      custom output for "expected to receive" entries.
    - Fallback to ToString when IDescribeSpecification not implemented.
    - Update code comment docs accordingly.
    
    Closes nsubstitute#796.
    dtchepak committed May 5, 2024
    Configuration menu
    Copy the full SHA
    e4bdaed View commit details
    Browse the repository at this point in the history
  2. Apply review comments

    - use string.Empty for null value from IDescribeSpecification, rather than
      falling back to ToString(). This supports the contract that
      IDescribeSpecification will be used if implemented. Replacing
      null string.Empty with matches the documented
      bheaviour of IDescribeNonMatches.
    - updated IDescribeSpecification code docs.
    - removed GenericToNonGenericMatcherProxyWithDescribe `ToString` as it
      can use the GenericToNonGenericMatcherProxy superclass implementation.
    - update ArgumentSpecification to also support IDescribeSpecification
      for its matcher.
    - Replace linq with Array.ConvertAll rather than requiring an extra
      ToArray conversion.
    dtchepak committed May 5, 2024
    Configuration menu
    Copy the full SHA
    aa3cd12 View commit details
    Browse the repository at this point in the history