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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user