Added Exception.Throws overload to take multiple possible messages to match

This way tests can pass in multiple possible string matches which the runtime may use as a message depending on the given platform (e.g.: MS-Runtime vs Mono)
This commit is contained in:
Redth
2014-09-09 09:39:05 -04:00
parent aa6c474999
commit 831e32809e
5 changed files with 77 additions and 34 deletions
@@ -791,10 +791,12 @@ third line", jsonTextReader.Value);
[Test]
public void NullTextReader()
{
ExceptionAssert.Throws<ArgumentNullException>(
@"Value cannot be null.
Parameter name: reader",
() => { new JsonTextReader(null); });
ExceptionAssert.Throws<ArgumentNullException> (
() => { new JsonTextReader (null); },
new string[] {
"Value cannot be null." + Environment.NewLine + "Parameter name: reader",
"Argument cannot be null." + Environment.NewLine + "Parameter name: reader" // Mono
});
}
[Test]