Here is an approach for in-order testing.
First, we add the [TestCaseOrderer] attribute to the xUnit test class then add the [TestPriority] attribute to the test method. The test method with higher Priority will run first.
using Juice.XUnit;
[TestCaseOrderer("Juice.XUnit.PriorityOrderer", "Juice.XUnit")]
public class EFTest
{
[Fact(TestPriority(99)]
public async Task Shoud_run_first()
{
}
[Fact(TestPriority(98)]
public async Task Shoud_run_second()
{
}
}
The library can be accessed via Nuget: