Exception in -Is.StringMatching(string)- method
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
NUnit Framework |
New
|
Undecided
|
Unassigned |
Bug Description
This is my code:
[Test]
public void Test_NUnitBug()
{
const string ExpectedString = "NUnit is :) happy!";
byte[] bytes = encoding.
string actualString = encoding.
}
This is the exception:
NUnit is :) happy!
NUnit is :) happy!
18
18
System.
at System.
at System.
at System.
at System.
at NUnit.Framework
at NUnit.Framework
at MyCopy.
------
I ran NUnit using the console and ReSharper.
tags: | added: framework |
Is.StringMatching() takes a string argument, which is to be used as a regular expression. Hence, it must be a valid regular expression. You should either use Is.EqualTo() or escape the ')' like this: @"NUnit is :\) happy!"