Hi, thanks for sharing this issue.
This warning is a new feature in v2.17 intended to draw attention to an internal issue encountered by NCrunch when trying to uniquely identify tests between discovery/execution. Although previous versions of NCrunch won't have given you this warning, they still will have encountered problems in executing these tests and meaningfully reporting their results.
In this particular case, the problem originates from the re-use of the same TestCaseSource data property. When you call SetName on the TestCaseData, NUnit uses this internally to override the name of the individual test case, disregarding the name of the test method referencing the TestCaseSource data property. NUnit (and ReSharper) can handle this internally because they still have a level of disambiguation through the use of an extra 'level' in the test name structure, which is the name of the method. NCrunch doesn't have this concept, so it instead tries to 'flatten' the structure down. When it does this, the names are ambiguous and therefore duplicated.
Fortunately, this is easy to work around. You just need to add some context in the test names you're creating. For example, the following code will achieve the result you're expecting:
Code:
using System.Collections.Generic;
using NUnit.Framework;
[TestFixture]
public class Tests
{
IEnumerable<TestCaseData> TestData(string context)
{
yield return new TestCaseData("Hello").SetName(context + " Hello");
yield return new TestCaseData("World").SetName(context + " World");
}
IEnumerable<TestCaseData> Test1_TestData() { return TestData("Test1"); }
IEnumerable<TestCaseData> Test2_TestData() { return TestData("Test2"); }
[TestCaseSource("Test1_TestData")]
public void Test1(string value)
{
}
[TestCaseSource("Test2_TestData")]
public void Test2(string value)
{
}
}