nunit3-vs-adapter: Cannot run an individual test whose TestCase parameter contains characters from the range [U+0001..U+001F]
Here is a sample code:
using NUnit.Framework;
using System;
namespace Test
{
[TestFixture]
public class TestClass
{
[TestCase('\x01', ExpectedResult = "%01")]
[TestCase('\x1F', ExpectedResult = "%1F")]
[TestCase('\x00', ExpectedResult = "%00")]
[TestCase('\x20', ExpectedResult = "%20")]
[TestCase('\x80', ExpectedResult = "%80")]
[TestCase('\x90', ExpectedResult = "%90")]
public string Test1(char c)
{
return Uri.HexEscape(c);
}
[TestCase("ABC\x01", ExpectedResult = "ABC%01")]
public string Test2(string s)
{
return Uri.EscapeDataString(s);
}
}
}
My project targets .NET Framework v. 4.6.1 and I use:
- Visual Studio Community 2017 v. 15.6.1;
- NUnit v. 3.9.0;
- NUnit 3 Test Adapter v. 3.10.0
If I press “Run all” in Test Explorer, all the tests from the sample above are executed without any errors. However, if I press “Run Selected Tests” in Test Explorer or “Run Tests” from the context menu in the code editor, Test2 and the first two test cases in Test1 are never executed.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 21 (11 by maintainers)
Ignore the previous comments - with a clean and rebuild and a restart of Visual Studio - they are all now running. Thank you for your help @OsirisTerje