Assertion message formatted poorly by PropertyConstraint
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
NUnit Framework |
Fix Released
|
Medium
|
Charlie Poole | ||
NUnit V2 |
Fix Released
|
Medium
|
Charlie Poole |
Bug Description
When I place an EqualConstraint with a tolerance inside a PropertyConstraint, the error message fails to format the tolerance.
So this is only a formatting issue, the test gives the correct result.
The following code reproduces the bug.
This was observed in NUnit version 2.5.5.10112
The code is compiled in Visual Studio 2010 targeting .NET 4.0 framework
public class C { public decimal d { get; set; } }
[TestFixture]
public class T
{
[Test]
public void PropertyConstra
{
var c = new C { d = 100.0m };
// Write the error message
// Expected: 105m +/- 0.1m
// But was: 100m
//Assert.
// Writes the error message
// Expected: property d equal to 105m +/- <NUnit.
// But was: 100m
Assert.That(c, new PropertyConstra
}
}
Changed in nunitv2: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in nunit-3.0: | |
status: | New → Triaged |
importance: | Undecided → Medium |
Changed in nunitv2: | |
assignee: | nobody → Charlie Poole (charlie.poole) |
milestone: | none → 2.5.6 |
Changed in nunitv2: | |
status: | Triaged → Fix Committed |
Changed in nunitv2: | |
status: | Fix Committed → Fix Released |
tags: | added: v2port |
Changed in nunit-3.0: | |
assignee: | nobody → Charlie Poole (charlie.poole) |
milestone: | none → 2.9.5 |
status: | Triaged → Fix Committed |
Changed in nunit-3.0: | |
status: | Fix Committed → Fix Released |