Skip to content

Instantly share code, notes, and snippets.

@phil-scott-78
Created August 7, 2016 03:48
Show Gist options
  • Save phil-scott-78/d58c9991c062ce1bfef814206f5c1624 to your computer and use it in GitHub Desktop.
Save phil-scott-78/d58c9991c062ce1bfef814206f5c1624 to your computer and use it in GitHub Desktop.
Reverse order xunit test cases
// apply assembly wide via [assembly: TestCaseOrderer("FullyNamespacedTypeName", "AssemblyName")]
public class ReverseOrderTestCaseOrderer : ITestCaseOrderer
{
public IEnumerable<TTestCase> OrderTestCases<TTestCase>(IEnumerable<TTestCase> testCases) where TTestCase : ITestCase
{
var results = testCases.ToList();
results.Reverse();
return results;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment