CollectionAssert for Dictionary

Reported by Rechenelf on 2011-05-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
NUnit Framework
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

Charlie Poole (charlie.poole) wrote :

This seems like a good idea.

Changed in nunit-3.0:
status: New → Triaged
importance: Undecided → Medium

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  Edit
Everyone can see this information.

Other bug subscribers