Exception message mismatch
"Eric" <[email protected]>
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <005401c8c989$b72818e0$0202a8c0@SMACK1> |
I'm testing for an ArgumentNullException message, so there will be info
about the parameter name in the message. When I look at the chars in the
message via the debugger, it shows the embedded escape sequences to be \r\n,
yet the code below fails. Why?
TIA,
Eric
---------- TEST -------------
[Test, ExpectedException(typeof(ArgumentNullException),
ExpectedMessage = "'Group Name' may not be null.\r\nParameter
name: String")]
public void Add_ErrorIfNullGroupKey() {
var unit = new Unit("USD");
Assert.That(Registrar.Exists(unit), Is.False);
Registrar.Fetch(null, unit.Name);
}
---------- RESULT -------------
RegistrarTest.Add_ErrorIfNullGroupKey : Failed
Expected exception message: 'Group Name' may not be null.
Parameter name: String
got: 'Group Name' may not be null.
Parameter name: String
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Nunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/nunit-users