CollectionAssert for Dictionary

Bug #780607 reported by Rechenelf
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit Framework
Triaged
Medium
Unassigned

Bug Description

[Issue now tracked at https://github.com/nunit/nunit-framework/issues/24]

It would be nice to have two other methods for CollectionAssert

CollectionAssert.ContainsValue(result.DisplayStrings, displayString);
instead of my current implementation
Assert.IsTrue(result.DisplayStrings.ContainsValue(displayString));

also:
CollectionAssert.ContainsKey

where result.DisplayStrings is a IDictionary

Revision history for this message
Charlie Poole (charlie.poole) wrote :

This seems like a good idea.

Changed in nunit-3.0:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Charlie Poole (charlie.poole) wrote : Re: [Bug 780607] [NEW] CollectionAssert for Dictionary

Ah... a further comment however: CollectionAssert was intended to be "frozen"
with all new abilities added through the Assert.That interface. In
addition, it is
expected to have the same API as the Microsoft CollectionAssert. So while we
will accept this feature, it might be implemented only as a constraint....

  Assert.That(result.DisplayStrings(), ContainsValue(displayString));

Charlie

On Tue, May 10, 2011 at 6:03 PM, Rechenelf <email address hidden> wrote:
> Public bug reported:
>
> It would be nice to have two other methods for CollectionAssert
>
> CollectionAssert.ContainsValue(result.DisplayStrings, displayString);
> instead of my current implementation
> Assert.IsTrue(result.DisplayStrings.ContainsValue(displayString));
>
> also:
> CollectionAssert.ContainsKey
>
> where result.DisplayStrings is a IDictionary
>
> ** Affects: nunit-3.0
>     Importance: Undecided
>         Status: New
>
>
> ** Tags: dictionary feature
>
> --
> You received this bug notification because you are subscribed to NUnit
> Extended Testing Platform.
> https://bugs.launchpad.net/bugs/780607
>
> Title:
>  CollectionAssert for Dictionary
>

tags: added: framework
description: updated
tags: added: github
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.