← Back to team overview

nunit-core team mailing list archive

[Bug 878376] Re: Add 'Exactly(n)' to the NUnit constraint syntax

 

** Summary changed:

- Add 'One' to the NUnit constraint syntax
+ Add 'Exactly(n)' to the NUnit constraint syntax

** Description changed:

  NUnit allows specifying constraints over IEnumerables using Has.None,
- Has.Some, Has.All. It would be useful to support Has.One, which will
- verify that the value only appears once in the collection. We may also
- consider supporting Has.Exactly(n) as a generalizaion.
+ Has.Some, Has.All. It would be useful to support Has.Exactly(n), which
+ will verify that the value only appears in the collection the specified
+ number of times.

** Changed in: nunitv2
       Status: Triaged => Fix Committed

-- 
You received this bug notification because you are a member of NUnit
Core Developers, which is the registrant for NUnit Framework.
https://bugs.launchpad.net/bugs/878376

Title:
  Add 'Exactly(n)' to the NUnit constraint syntax

Status in NUnit Test Framework:
  Triaged
Status in NUnit V2 Test Framework:
  Fix Committed

Bug description:
  NUnit allows specifying constraints over IEnumerables using Has.None,
  Has.Some, Has.All. It would be useful to support Has.Exactly(n), which
  will verify that the value only appears in the collection the
  specified number of times.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nunit-3.0/+bug/878376/+subscriptions


References