You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
EntityFrameworkCore.Jet/test/Shared/TestUtilities/Xunit/AscendingTestCaseOrderer.cs

21 lines
664 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using Xunit.Abstractions;
using Xunit.Sdk;
// ReSharper disable once CheckNamespace
namespace EntityFrameworkCore.Jet.FunctionalTests.TestUtilities.Xunit;
public class AscendingTestCaseOrderer : ITestCaseOrderer
{
public IEnumerable<TTestCase> OrderTestCases<TTestCase>(IEnumerable<TTestCase> testCases)
where TTestCase : ITestCase
{
var orderTestCases = testCases.OrderBy(c => c.TestMethod.TestClass.Class.Name, StringComparer.Ordinal)
.ThenBy(c => c.DisplayName, StringComparer.Ordinal)
.ToList();
return orderTestCases;
}
}