diff --git a/BenchmarkMockNet.Tests/BenchmarkTests.cs b/BenchmarkMockNet.Tests/BenchmarkTests.cs index 9339ae5..b085769 100644 --- a/BenchmarkMockNet.Tests/BenchmarkTests.cs +++ b/BenchmarkMockNet.Tests/BenchmarkTests.cs @@ -19,14 +19,17 @@ public static class BenchmarkTests { typeof(Verify), result => result is null } }; - public static IEnumerable Matrix + public static TheoryData Matrix { get { - var matrix = new List(); + var matrix = new TheoryData(); foreach (var benchmark in Benchmarks) { - matrix.AddRange(Methods.Select(method => new object[] { benchmark.Key, method })); + foreach (var method in Methods) + { + matrix.Add(benchmark.Key, method); + } } return matrix; @@ -42,7 +45,7 @@ public static void RunAll(Type type, MethodInfo library) var method = benchmark?.GetType().GetMethod(library.Name); //act - var result = method?.Invoke(benchmark, Array.Empty()); + var result = method?.Invoke(benchmark, []); //assert var assertion = Benchmarks[type];