Reporter | Alexander Kurakin (Alexander.Kurakin) |
---|---|
Created | Mar 10, 2017 4:00:08 PM |
Updated | Apr 16, 2018 4:35:04 PM |
Subsystem | Unit Testing |
Assignee | Eugene Strizhok (Eugene.Strizhok) |
Priority | Critical |
State | Reopened |
Type | Bug |
Fix version | 2018.2 |
Affected versions | 2017.1 |
Fixed In Version ReSharper | Undefined |
VsVersion | All Versions |
Running a test case such as:
I presume ReSharper doesn't escape the strings as part of the test name, but NUnit does, and so the test runner is out of date with NUnit until it gets the actual names from NUnit.
[Test]will result in duplicate sets of tests in the test runner on the first run, with the first set of tests being inconclusive and having names with unescaped names.
[TestCase("Example 1\nExample 2", "Example 1\r\nExample 2")]
[TestCase("\nPrefixedNewLine", "\r\nPrefixedNewLine")]
[TestCase("EndNewLine\n", "EndNewLine\r\n")]
[TestCase("NothingToChange\r\nHere", "NothingToChange\r\nHere")]
[TestCase("MultipleNew\r\n\n\n\n\r\n\r\n\nLines", "MultipleNew\r\n\r\n\r\n\r\n\r\n\r\n\r\nLines")]
public void StringVerification(string original, string expected)
{
string transformed = original;
Assert.That(transformed, Is.EqualTo(expected));
}
I presume ReSharper doesn't escape the strings as part of the test name, but NUnit does, and so the test runner is out of date with NUnit until it gets the actual names from NUnit.