I have test with parameter like this:
class Test
{
[Test, Category("somecategory")]
public void SomeTest([ValueSource(typeof(Data), "Variants")] string variants)
{
// code for test
}
}
class Data
{
public string[] Variants()
{
string[] variants = new string[] { "a", "b" };
return variants;
}
}
I need to add Category based on ValueSource of test. If test is using variant a, it have category a. So it can be started separately in NUnit console.