Closed Jishun closed 5 years ago
Thanks, that's a good idea. Changing the default would be a breaking change, but I'll take a look at letting the user provide a default for a given class.
Thanks for the quick response, looking forward to it!
btw, quick idea, a bit hacky but changing the parameter type to long
would extend the room...
You can now add a DefaultPriority
attribute to a class to specify what priority gets assigned to tests without a Priority
attribute. So you can do:
[DefaultPriority(0)]
public class MyTests
{
[Fact]
public void SomeTest() { }
[Fact]
public void SomeOtherTest() { }
[Fact, Priority(10)]
public void RunMeLast() { }
}
It's very easy to have one test that run before everyone else by adding a Priority attribute with everyone else left un-attributed
however, it is impossible to mark one test to run at the end without attributing all others, the code defaults the Priority to int.MaxValue which leaves no room to append anything later than default, suggest find a mid-value as a default to give flexibility
Thanks