← Back to team overview

nunit-core team mailing list archive

[Bug 527729] Re: CollectionAssert.DoesNotContain does not work in correctly in cssyntax.cs

 

** Project changed: nunit-3.0 => nunitv2

** Changed in: nunitv2
       Status: New => Triaged

** Changed in: nunitv2
   Importance: Undecided => Low

** Changed in: nunitv2
    Milestone: None => 2.5.5

-- 
CollectionAssert.DoesNotContain does not work in correctly in cssyntax.cs
https://bugs.launchpad.net/bugs/527729
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.

Status in NUnit V2 Test Framework: Triaged

Bug description:
Maybe i am to new to all this testing and c#. Here the lines of AssertSyntaxTests that do not seem to work correctly

  int[] iarray = new int[] { 1, 2, 3 };
  double onedouble = 1.0d;

// Showing that Contains uses object equality
  Assert.That(iarray, Has.No.Member( 1.0d )); // fails
CollectionAssert.DoesNotContain(iarray, 1.0d); // fails

The Messge is: 
"Expected: not collection containing 1.0d  But was:  < 1, 2, 3 > - C:\Program Files\NUnit 2.5.3\samples\csharp\syntax\AssertSyntaxTests.cs:558,4"

CollectionAssert.Contains(iarray, 1.0d); // does not fail

Possibly its just an implicit type cast, but it does fail the whole tree - or is that intended to happen?

If it is of any interest:
I am currently using VS 2008 Express and SharpDev - both with same results





References