diff --git a/TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete1.verified.txt b/TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete1.verified.txt index e38f2bfafa..a233745939 100644 --- a/TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete1.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete1.verified.txt @@ -92,11 +92,7 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClass } } } -internal static class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass1), new TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource()); - } + static readonly int _r_TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass1), new TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource()); } diff --git a/TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete2.verified.txt b/TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete2.verified.txt index a334906dc0..9d37c10762 100644 --- a/TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete2.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete2.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -94,11 +94,10 @@ internal static class TUnit_TestProject_AbstractTests_ConcreteClass2__TestSource { return new global::TUnit.TestProject.AbstractTests.ConcreteClass2(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass2), TUnit_TestProject_AbstractTests_ConcreteClass2__TestSource.GetTests, TUnit_TestProject_AbstractTests_ConcreteClass2__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_AbstractTests_ConcreteClass2__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass2), TUnit_TestProject_AbstractTests_ConcreteClass2__TestSource.GetTests, TUnit_TestProject_AbstractTests_ConcreteClass2__TestSource.EnumerateTestDescriptors); } @@ -199,13 +198,9 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClass } } } -internal static class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClassName_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass2), new TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClassName_TestSource()); - } + static readonly int _r_TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClassName_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass2), new TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClassName_TestSource()); } @@ -305,11 +300,7 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClass } } } -internal static class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass1), new TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource()); - } + static readonly int _r_TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass1), new TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource()); } diff --git a/TUnit.Core.SourceGenerator.Tests/AfterAllTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/AfterAllTests.Test.verified.txt index 0c29a6fdad..fe4159b8ea 100644 --- a/TUnit.Core.SourceGenerator.Tests/AfterAllTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/AfterAllTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -145,9 +145,8 @@ internal static class TUnit_TestProject_AfterTests_CleanupTests__TestSource { return new global::TUnit.TestProject.AfterTests.CleanupTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.AfterTests.CleanupTests), TUnit_TestProject_AfterTests_CleanupTests__TestSource.GetTests, TUnit_TestProject_AfterTests_CleanupTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_AfterTests_CleanupTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.AfterTests.CleanupTests), TUnit_TestProject_AfterTests_CleanupTests__TestSource.GetTests, TUnit_TestProject_AfterTests_CleanupTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/AfterTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/AfterTests.Test.verified.txt index 0c29a6fdad..fe4159b8ea 100644 --- a/TUnit.Core.SourceGenerator.Tests/AfterTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/AfterTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -145,9 +145,8 @@ internal static class TUnit_TestProject_AfterTests_CleanupTests__TestSource { return new global::TUnit.TestProject.AfterTests.CleanupTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.AfterTests.CleanupTests), TUnit_TestProject_AfterTests_CleanupTests__TestSource.GetTests, TUnit_TestProject_AfterTests_CleanupTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_AfterTests_CleanupTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.AfterTests.CleanupTests), TUnit_TestProject_AfterTests_CleanupTests__TestSource.GetTests, TUnit_TestProject_AfterTests_CleanupTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ArgsAsArrayTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ArgsAsArrayTests.Test.verified.txt index 1e70639135..0076876248 100644 --- a/TUnit.Core.SourceGenerator.Tests/ArgsAsArrayTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ArgsAsArrayTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -360,9 +360,8 @@ internal static class TUnit_TestProject_ArgsAsArrayTests__TestSource { return new global::TUnit.TestProject.ArgsAsArrayTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.ArgsAsArrayTests), TUnit_TestProject_ArgsAsArrayTests__TestSource.GetTests, TUnit_TestProject_ArgsAsArrayTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_ArgsAsArrayTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.ArgsAsArrayTests), TUnit_TestProject_ArgsAsArrayTests__TestSource.GetTests, TUnit_TestProject_ArgsAsArrayTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ArgumentWithImplicitConverterTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ArgumentWithImplicitConverterTests.Test.verified.txt index 8d9f875508..8591dcea4a 100644 --- a/TUnit.Core.SourceGenerator.Tests/ArgumentWithImplicitConverterTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ArgumentWithImplicitConverterTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -200,9 +200,8 @@ internal static class TUnit_TestProject_ArgumentWithImplicitConverterTests__Test { return new global::TUnit.TestProject.ArgumentWithImplicitConverterTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.ArgumentWithImplicitConverterTests), TUnit_TestProject_ArgumentWithImplicitConverterTests__TestSource.GetTests, TUnit_TestProject_ArgumentWithImplicitConverterTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_ArgumentWithImplicitConverterTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.ArgumentWithImplicitConverterTests), TUnit_TestProject_ArgumentWithImplicitConverterTests__TestSource.GetTests, TUnit_TestProject_ArgumentWithImplicitConverterTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/AssemblyAfterTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/AssemblyAfterTests.Test.verified.txt index 9d80513d73..660058ea7c 100644 --- a/TUnit.Core.SourceGenerator.Tests/AssemblyAfterTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/AssemblyAfterTests.Test.verified.txt @@ -15,50 +15,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyBase1_AfterAll1_After_Assembly; -internal static class TUnit_TestProject_AfterTests_AssemblyBase1_AfterAll1_After_AssemblyInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyBase1_AfterAll1_After_Assembly { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_AfterTests_AssemblyBase1_AfterAll1_After_AssemblyInitializer { - var TestsBase`1_assembly = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase1).Assembly; - global::TUnit.Core.Sources.AfterAssemblyHooks.GetOrAdd(TestsBase`1_assembly, static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.AfterAssemblyHooks[TestsBase`1_assembly].Add( - new AfterAssemblyHookMethod + internal static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyBase1_AfterAll1_0Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.AssemblyBase1.AfterAll1()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_AfterTests_AssemblyBase1_AfterAll1_After_Assembly = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterAssemblyHooks, typeof(global::TUnit.TestProject.AfterTests.AssemblyBase1).Assembly, + new AfterAssemblyHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase1)), + Name = "AfterAll1", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyBase1", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase1)), - Name = "AfterAll1", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyBase1", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase1)), - Name = "AssemblyBase1", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterAssemblyHookIndex(), - Body = global_TUnit_TestProject_AfterTests_AssemblyBase1_AfterAll1_0Params_Body, - FilePath = @"", - LineNumber = 5 - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyBase1_AfterAll1_0Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.AssemblyBase1.AfterAll1()); + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase1)), + Name = "AssemblyBase1", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterAssemblyHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyBase1_AfterAll1_After_Assembly.TUnit_TestProject_AfterTests_AssemblyBase1_AfterAll1_After_AssemblyInitializer.global_TUnit_TestProject_AfterTests_AssemblyBase1_AfterAll1_0Params_Body, + FilePath = @"", + LineNumber = 5 + } +); } } @@ -82,49 +84,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyBase1_AfterEach1_After_Test; -internal static class TUnit_TestProject_AfterTests_AssemblyBase1_AfterEach1_After_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyBase1_AfterEach1_After_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_AfterTests_AssemblyBase1_AfterEach1_After_TestInitializer { - global::TUnit.Core.Sources.AfterTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase1), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.AfterTestHooks[typeof(global::TUnit.TestProject.AfterTests.AssemblyBase1)].Add( - new InstanceHookMethod + internal static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyBase1_AfterEach1_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.AfterTests.AssemblyBase1)instance; + await AsyncConvert.Convert(() => typedInstance.AfterEach1()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_AfterTests_AssemblyBase1_AfterEach1_After_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterTestHooks, typeof(global::TUnit.TestProject.AfterTests.AssemblyBase1), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase1), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase1)), + Name = "AfterEach1", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyBase1", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase1), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase1)), - Name = "AfterEach1", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyBase1", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase1)), - Name = "AssemblyBase1", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), - Body = global_TUnit_TestProject_AfterTests_AssemblyBase1_AfterEach1_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyBase1_AfterEach1_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.AfterTests.AssemblyBase1)instance; - await AsyncConvert.Convert(() => typedInstance.AfterEach1()); + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase1)), + Name = "AssemblyBase1", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyBase1_AfterEach1_After_Test.TUnit_TestProject_AfterTests_AssemblyBase1_AfterEach1_After_TestInitializer.global_TUnit_TestProject_AfterTests_AssemblyBase1_AfterEach1_0Params_Body + } +); } } @@ -148,50 +153,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyBase2_AfterAll2_After_Assembly; -internal static class TUnit_TestProject_AfterTests_AssemblyBase2_AfterAll2_After_AssemblyInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyBase2_AfterAll2_After_Assembly { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_AfterTests_AssemblyBase2_AfterAll2_After_AssemblyInitializer { - var TestsBase`1_assembly = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase2).Assembly; - global::TUnit.Core.Sources.AfterAssemblyHooks.GetOrAdd(TestsBase`1_assembly, static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.AfterAssemblyHooks[TestsBase`1_assembly].Add( - new AfterAssemblyHookMethod + internal static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyBase2_AfterAll2_0Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.AssemblyBase2.AfterAll2()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_AfterTests_AssemblyBase2_AfterAll2_After_Assembly = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterAssemblyHooks, typeof(global::TUnit.TestProject.AfterTests.AssemblyBase2).Assembly, + new AfterAssemblyHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase2)), + Name = "AfterAll2", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyBase2", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase2)), - Name = "AfterAll2", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyBase2", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase2)), - Name = "AssemblyBase2", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterAssemblyHookIndex(), - Body = global_TUnit_TestProject_AfterTests_AssemblyBase2_AfterAll2_0Params_Body, - FilePath = @"", - LineNumber = 20 - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyBase2_AfterAll2_0Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.AssemblyBase2.AfterAll2()); + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase2)), + Name = "AssemblyBase2", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterAssemblyHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyBase2_AfterAll2_After_Assembly.TUnit_TestProject_AfterTests_AssemblyBase2_AfterAll2_After_AssemblyInitializer.global_TUnit_TestProject_AfterTests_AssemblyBase2_AfterAll2_0Params_Body, + FilePath = @"", + LineNumber = 20 + } +); } } @@ -215,49 +222,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyBase2_AfterEach2_After_Test; -internal static class TUnit_TestProject_AfterTests_AssemblyBase2_AfterEach2_After_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyBase2_AfterEach2_After_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_AfterTests_AssemblyBase2_AfterEach2_After_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyBase2_AfterEach2_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.AfterTests.AssemblyBase2)instance; + await AsyncConvert.Convert(() => typedInstance.AfterEach2()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_AfterTests_AssemblyBase2_AfterEach2_After_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterTestHooks, typeof(global::TUnit.TestProject.AfterTests.AssemblyBase2), + new InstanceHookMethod { - global::TUnit.Core.Sources.AfterTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase2), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.AfterTestHooks[typeof(global::TUnit.TestProject.AfterTests.AssemblyBase2)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase2), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase2)), + Name = "AfterEach2", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyBase2", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase2), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase2)), - Name = "AfterEach2", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyBase2", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase2)), - Name = "AssemblyBase2", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), - Body = global_TUnit_TestProject_AfterTests_AssemblyBase2_AfterEach2_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyBase2_AfterEach2_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.AfterTests.AssemblyBase2)instance; - await AsyncConvert.Convert(() => typedInstance.AfterEach2()); + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase2)), + Name = "AssemblyBase2", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyBase2_AfterEach2_After_Test.TUnit_TestProject_AfterTests_AssemblyBase2_AfterEach2_After_TestInitializer.global_TUnit_TestProject_AfterTests_AssemblyBase2_AfterEach2_0Params_Body + } +); } } @@ -281,50 +291,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyBase3_AfterAll3_After_Assembly; -internal static class TUnit_TestProject_AfterTests_AssemblyBase3_AfterAll3_After_AssemblyInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyBase3_AfterAll3_After_Assembly +{ + internal static class TUnit_TestProject_AfterTests_AssemblyBase3_AfterAll3_After_AssemblyInitializer + { + internal static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyBase3_AfterAll3_0Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.AssemblyBase3.AfterAll3()); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_AfterTests_AssemblyBase3_AfterAll3_After_Assembly = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterAssemblyHooks, typeof(global::TUnit.TestProject.AfterTests.AssemblyBase3).Assembly, + new AfterAssemblyHookMethod { - var TestsBase`1_assembly = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase3).Assembly; - global::TUnit.Core.Sources.AfterAssemblyHooks.GetOrAdd(TestsBase`1_assembly, static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.AfterAssemblyHooks[TestsBase`1_assembly].Add( - new AfterAssemblyHookMethod + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase3)), + Name = "AfterAll3", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyBase3", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase3)), - Name = "AfterAll3", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyBase3", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase3)), - Name = "AssemblyBase3", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterAssemblyHookIndex(), - Body = global_TUnit_TestProject_AfterTests_AssemblyBase3_AfterAll3_0Params_Body, - FilePath = @"", - LineNumber = 35 - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyBase3_AfterAll3_0Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.AssemblyBase3.AfterAll3()); + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase3)), + Name = "AssemblyBase3", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterAssemblyHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyBase3_AfterAll3_After_Assembly.TUnit_TestProject_AfterTests_AssemblyBase3_AfterAll3_After_AssemblyInitializer.global_TUnit_TestProject_AfterTests_AssemblyBase3_AfterAll3_0Params_Body, + FilePath = @"", + LineNumber = 35 + } +); } } @@ -348,49 +360,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyBase3_AfterEach3_After_Test; -internal static class TUnit_TestProject_AfterTests_AssemblyBase3_AfterEach3_After_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyBase3_AfterEach3_After_Test +{ + internal static class TUnit_TestProject_AfterTests_AssemblyBase3_AfterEach3_After_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyBase3_AfterEach3_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.AfterTests.AssemblyBase3)instance; + await AsyncConvert.Convert(() => typedInstance.AfterEach3()); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration { - global::TUnit.Core.Sources.AfterTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase3), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.AfterTestHooks[typeof(global::TUnit.TestProject.AfterTests.AssemblyBase3)].Add( - new InstanceHookMethod + static readonly int _h_TUnit_TestProject_AfterTests_AssemblyBase3_AfterEach3_After_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterTestHooks, typeof(global::TUnit.TestProject.AfterTests.AssemblyBase3), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase3), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase3)), + Name = "AfterEach3", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyBase3", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase3), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase3)), - Name = "AfterEach3", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyBase3", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase3)), - Name = "AssemblyBase3", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), - Body = global_TUnit_TestProject_AfterTests_AssemblyBase3_AfterEach3_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyBase3_AfterEach3_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.AfterTests.AssemblyBase3)instance; - await AsyncConvert.Convert(() => typedInstance.AfterEach3()); + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyBase3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyBase3)), + Name = "AssemblyBase3", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyBase3_AfterEach3_After_Test.TUnit_TestProject_AfterTests_AssemblyBase3_AfterEach3_After_TestInitializer.global_TUnit_TestProject_AfterTests_AssemblyBase3_AfterEach3_0Params_Body + } +); } } @@ -414,50 +429,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUp_After_Assembly; -internal static class TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUp_After_AssemblyInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUp_After_Assembly +{ + internal static class TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUp_After_AssemblyInitializer + { + internal static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUp_0Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.AssemblyCleanupTests.AfterAllCleanUp()); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration { - var TestsBase`1_assembly = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests).Assembly; - global::TUnit.Core.Sources.AfterAssemblyHooks.GetOrAdd(TestsBase`1_assembly, static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.AfterAssemblyHooks[TestsBase`1_assembly].Add( - new AfterAssemblyHookMethod + static readonly int _h_TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUp_After_Assembly = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterAssemblyHooks, typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests).Assembly, + new AfterAssemblyHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), + Name = "AfterAllCleanUp", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyCleanupTests", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), - Name = "AfterAllCleanUp", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyCleanupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), - Name = "AssemblyCleanupTests", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterAssemblyHookIndex(), - Body = global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUp_0Params_Body, - FilePath = @"", - LineNumber = 50 - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUp_0Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.AssemblyCleanupTests.AfterAllCleanUp()); + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), + Name = "AssemblyCleanupTests", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterAssemblyHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUp_After_Assembly.TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUp_After_AssemblyInitializer.global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUp_0Params_Body, + FilePath = @"", + LineNumber = 50 + } +); } } @@ -481,53 +498,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUpWithContext__AssemblyHookContext_After_Assembly; -internal static class TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUpWithContext__AssemblyHookContext_After_AssemblyInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUpWithContext__AssemblyHookContext_After_Assembly { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUpWithContext__AssemblyHookContext_After_AssemblyInitializer { - var TestsBase`1_assembly = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests).Assembly; - global::TUnit.Core.Sources.AfterAssemblyHooks.GetOrAdd(TestsBase`1_assembly, static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.AfterAssemblyHooks[TestsBase`1_assembly].Add( - new AfterAssemblyHookMethod + internal static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUpWithContext_1Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.AssemblyCleanupTests.AfterAllCleanUpWithContext(context)); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUpWithContext__AssemblyHookContext_After_Assembly = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterAssemblyHooks, typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests).Assembly, + new AfterAssemblyHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), + Name = "AfterAllCleanUpWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.AssemblyHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.AssemblyHookContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests).GetMethod("AfterAllCleanUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.AssemblyHookContext) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyCleanupTests", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), - Name = "AfterAllCleanUpWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.AssemblyHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.AssemblyHookContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests).GetMethod("AfterAllCleanUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.AssemblyHookContext) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyCleanupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), - Name = "AssemblyCleanupTests", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterAssemblyHookIndex(), - Body = global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUpWithContext_1Params_Body, - FilePath = @"", - LineNumber = 56 - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUpWithContext_1Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.AssemblyCleanupTests.AfterAllCleanUpWithContext(context)); + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), + Name = "AssemblyCleanupTests", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterAssemblyHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUpWithContext__AssemblyHookContext_After_Assembly.TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUpWithContext__AssemblyHookContext_After_AssemblyInitializer.global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUpWithContext_1Params_Body, + FilePath = @"", + LineNumber = 56 + } +); } } @@ -551,50 +570,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUp2_After_Assembly; -internal static class TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUp2_After_AssemblyInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUp2_After_Assembly { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUp2_After_AssemblyInitializer { - var TestsBase`1_assembly = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests).Assembly; - global::TUnit.Core.Sources.AfterAssemblyHooks.GetOrAdd(TestsBase`1_assembly, static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.AfterAssemblyHooks[TestsBase`1_assembly].Add( - new AfterAssemblyHookMethod + internal static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUp2_0Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.AssemblyCleanupTests.AfterAllCleanUp2()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUp2_After_Assembly = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterAssemblyHooks, typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests).Assembly, + new AfterAssemblyHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), + Name = "AfterAllCleanUp2", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyCleanupTests", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), - Name = "AfterAllCleanUp2", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyCleanupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), - Name = "AssemblyCleanupTests", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterAssemblyHookIndex(), - Body = global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUp2_0Params_Body, - FilePath = @"", - LineNumber = 62 - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUp2_0Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.AssemblyCleanupTests.AfterAllCleanUp2()); + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), + Name = "AssemblyCleanupTests", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterAssemblyHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUp2_After_Assembly.TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUp2_After_AssemblyInitializer.global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUp2_0Params_Body, + FilePath = @"", + LineNumber = 62 + } +); } } @@ -618,54 +639,56 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUpWithContextAndToken__AssemblyHookContext_CancellationToken_After_Assembly; -internal static class TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUpWithContextAndToken__AssemblyHookContext_CancellationToken_After_AssemblyInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUpWithContextAndToken__AssemblyHookContext_CancellationToken_After_Assembly +{ + internal static class TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUpWithContextAndToken__AssemblyHookContext_CancellationToken_After_AssemblyInitializer + { + internal static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUpWithContextAndToken_2Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.AssemblyCleanupTests.AfterAllCleanUpWithContextAndToken(context, cancellationToken)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration { - var TestsBase`1_assembly = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests).Assembly; - global::TUnit.Core.Sources.AfterAssemblyHooks.GetOrAdd(TestsBase`1_assembly, static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.AfterAssemblyHooks[TestsBase`1_assembly].Add( - new AfterAssemblyHookMethod + static readonly int _h_TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUpWithContextAndToken__AssemblyHookContext_CancellationToken_After_Assembly = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterAssemblyHooks, typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests).Assembly, + new AfterAssemblyHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), + Name = "AfterAllCleanUpWithContextAndToken", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.AssemblyHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.AssemblyHookContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests).GetMethod("AfterAllCleanUpWithContextAndToken", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.AssemblyHookContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests).GetMethod("AfterAllCleanUpWithContextAndToken", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.AssemblyHookContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyCleanupTests", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), - Name = "AfterAllCleanUpWithContextAndToken", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.AssemblyHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.AssemblyHookContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests).GetMethod("AfterAllCleanUpWithContextAndToken", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.AssemblyHookContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests).GetMethod("AfterAllCleanUpWithContextAndToken", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.AssemblyHookContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyCleanupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), - Name = "AssemblyCleanupTests", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterAssemblyHookIndex(), - Body = global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUpWithContextAndToken_2Params_Body, - FilePath = @"", - LineNumber = 68 - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUpWithContextAndToken_2Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.AssemblyCleanupTests.AfterAllCleanUpWithContextAndToken(context, cancellationToken)); + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), + Name = "AssemblyCleanupTests", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterAssemblyHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUpWithContextAndToken__AssemblyHookContext_CancellationToken_After_Assembly.TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUpWithContextAndToken__AssemblyHookContext_CancellationToken_After_AssemblyInitializer.global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_AfterAllCleanUpWithContextAndToken_2Params_Body, + FilePath = @"", + LineNumber = 68 + } +); } } @@ -689,49 +712,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyCleanupTests_Cleanup_After_Test; -internal static class TUnit_TestProject_AfterTests_AssemblyCleanupTests_Cleanup_After_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyCleanupTests_Cleanup_After_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_AfterTests_AssemblyCleanupTests_Cleanup_After_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_Cleanup_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)instance; + await AsyncConvert.Convert(() => typedInstance.Cleanup()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_AfterTests_AssemblyCleanupTests_Cleanup_After_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterTestHooks, typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), + new InstanceHookMethod { - global::TUnit.Core.Sources.AfterTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.AfterTestHooks[typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), + Name = "Cleanup", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyCleanupTests", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), - Name = "Cleanup", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyCleanupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), - Name = "AssemblyCleanupTests", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), - Body = global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_Cleanup_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_Cleanup_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)instance; - await AsyncConvert.Convert(() => typedInstance.Cleanup()); + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), + Name = "AssemblyCleanupTests", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyCleanupTests_Cleanup_After_Test.TUnit_TestProject_AfterTests_AssemblyCleanupTests_Cleanup_After_TestInitializer.global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_Cleanup_0Params_Body + } +); } } @@ -755,52 +781,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyCleanupTests_Cleanup__CancellationToken_After_Test; -internal static class TUnit_TestProject_AfterTests_AssemblyCleanupTests_Cleanup__CancellationToken_After_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyCleanupTests_Cleanup__CancellationToken_After_Test +{ + internal static class TUnit_TestProject_AfterTests_AssemblyCleanupTests_Cleanup__CancellationToken_After_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_Cleanup_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)instance; + await AsyncConvert.Convert(() => typedInstance.Cleanup(cancellationToken)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_AfterTests_AssemblyCleanupTests_Cleanup__CancellationToken_After_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterTestHooks, typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), + new InstanceHookMethod { - global::TUnit.Core.Sources.AfterTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.AfterTestHooks[typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), + Name = "Cleanup", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] { - InitClassType = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), - Name = "Cleanup", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests).GetMethod("Cleanup", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyCleanupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), - Name = "AssemblyCleanupTests", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), - Body = global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_Cleanup_1Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_Cleanup_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)instance; - await AsyncConvert.Convert(() => typedInstance.Cleanup(cancellationToken)); + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests).GetMethod("Cleanup", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyCleanupTests", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), + Name = "AssemblyCleanupTests", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyCleanupTests_Cleanup__CancellationToken_After_Test.TUnit_TestProject_AfterTests_AssemblyCleanupTests_Cleanup__CancellationToken_After_TestInitializer.global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_Cleanup_1Params_Body + } +); } } @@ -824,52 +853,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyCleanupTests_CleanupWithContext__TestContext_After_Test; -internal static class TUnit_TestProject_AfterTests_AssemblyCleanupTests_CleanupWithContext__TestContext_After_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyCleanupTests_CleanupWithContext__TestContext_After_Test +{ + internal static class TUnit_TestProject_AfterTests_AssemblyCleanupTests_CleanupWithContext__TestContext_After_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_CleanupWithContext_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)instance; + await AsyncConvert.Convert(() => typedInstance.CleanupWithContext(context)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_AfterTests_AssemblyCleanupTests_CleanupWithContext__TestContext_After_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterTestHooks, typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), + new InstanceHookMethod { - global::TUnit.Core.Sources.AfterTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.AfterTestHooks[typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), + Name = "CleanupWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests).GetMethod("CleanupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyCleanupTests", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), - Name = "CleanupWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests).GetMethod("CleanupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyCleanupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), - Name = "AssemblyCleanupTests", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), - Body = global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_CleanupWithContext_1Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_CleanupWithContext_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)instance; - await AsyncConvert.Convert(() => typedInstance.CleanupWithContext(context)); + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), + Name = "AssemblyCleanupTests", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyCleanupTests_CleanupWithContext__TestContext_After_Test.TUnit_TestProject_AfterTests_AssemblyCleanupTests_CleanupWithContext__TestContext_After_TestInitializer.global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_CleanupWithContext_1Params_Body + } +); } } @@ -893,52 +925,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyCleanupTests_CleanupWithContext__TestContext_CancellationToken_After_Test; -internal static class TUnit_TestProject_AfterTests_AssemblyCleanupTests_CleanupWithContext__TestContext_CancellationToken_After_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyCleanupTests_CleanupWithContext__TestContext_CancellationToken_After_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_AfterTests_AssemblyCleanupTests_CleanupWithContext__TestContext_CancellationToken_After_TestInitializer { - global::TUnit.Core.Sources.AfterTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.AfterTestHooks[typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)].Add( - new InstanceHookMethod + internal static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_CleanupWithContext_2Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)instance; + await AsyncConvert.Convert(() => typedInstance.CleanupWithContext(context, cancellationToken)); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_AfterTests_AssemblyCleanupTests_CleanupWithContext__TestContext_CancellationToken_After_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterTestHooks, typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), + Name = "CleanupWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] { - InitClassType = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), - Name = "CleanupWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests).GetMethod("CleanupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests).GetMethod("CleanupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyCleanupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), - Name = "AssemblyCleanupTests", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), - Body = global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_CleanupWithContext_2Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_CleanupWithContext_2Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)instance; - await AsyncConvert.Convert(() => typedInstance.CleanupWithContext(context, cancellationToken)); + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests).GetMethod("CleanupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests).GetMethod("CleanupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.AssemblyCleanupTests", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.AssemblyCleanupTests)), + Name = "AssemblyCleanupTests", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_AssemblyCleanupTests_CleanupWithContext__TestContext_CancellationToken_After_Test.TUnit_TestProject_AfterTests_AssemblyCleanupTests_CleanupWithContext__TestContext_CancellationToken_After_TestInitializer.global_TUnit_TestProject_AfterTests_AssemblyCleanupTests_CleanupWithContext_2Params_Body + } +); } } diff --git a/TUnit.Core.SourceGenerator.Tests/AssemblyBeforeTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/AssemblyBeforeTests.Test.verified.txt index fbf2224b0c..b9e9451d7a 100644 --- a/TUnit.Core.SourceGenerator.Tests/AssemblyBeforeTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/AssemblyBeforeTests.Test.verified.txt @@ -15,50 +15,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblyBase1_BeforeAll1_Before_Assembly; -internal static class TUnit_TestProject_BeforeTests_AssemblyBase1_BeforeAll1_Before_AssemblyInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblyBase1_BeforeAll1_Before_Assembly { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_AssemblyBase1_BeforeAll1_Before_AssemblyInitializer { - var TestsBase`1_assembly = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase1).Assembly; - global::TUnit.Core.Sources.BeforeAssemblyHooks.GetOrAdd(TestsBase`1_assembly, static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeAssemblyHooks[TestsBase`1_assembly].Add( - new BeforeAssemblyHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblyBase1_BeforeAll1_0Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.AssemblyBase1.BeforeAll1()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_AssemblyBase1_BeforeAll1_Before_Assembly = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeAssemblyHooks, typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase1).Assembly, + new BeforeAssemblyHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase1)), + Name = "BeforeAll1", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblyBase1", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase1)), - Name = "BeforeAll1", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblyBase1", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase1)), - Name = "AssemblyBase1", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeAssemblyHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_AssemblyBase1_BeforeAll1_0Params_Body, - FilePath = @"", - LineNumber = 5 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblyBase1_BeforeAll1_0Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.AssemblyBase1.BeforeAll1()); + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase1)), + Name = "AssemblyBase1", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeAssemblyHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblyBase1_BeforeAll1_Before_Assembly.TUnit_TestProject_BeforeTests_AssemblyBase1_BeforeAll1_Before_AssemblyInitializer.global_TUnit_TestProject_BeforeTests_AssemblyBase1_BeforeAll1_0Params_Body, + FilePath = @"", + LineNumber = 5 + } +); } } @@ -82,49 +84,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblyBase1_BeforeEach1_Before_Test; -internal static class TUnit_TestProject_BeforeTests_AssemblyBase1_BeforeEach1_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblyBase1_BeforeEach1_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_AssemblyBase1_BeforeEach1_Before_TestInitializer { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase1), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase1)].Add( - new InstanceHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblyBase1_BeforeEach1_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.AssemblyBase1)instance; + await AsyncConvert.Convert(() => typedInstance.BeforeEach1()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_AssemblyBase1_BeforeEach1_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase1), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase1), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase1)), + Name = "BeforeEach1", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblyBase1", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase1), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase1)), - Name = "BeforeEach1", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblyBase1", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase1)), - Name = "AssemblyBase1", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_AssemblyBase1_BeforeEach1_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblyBase1_BeforeEach1_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.AssemblyBase1)instance; - await AsyncConvert.Convert(() => typedInstance.BeforeEach1()); + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase1)), + Name = "AssemblyBase1", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblyBase1_BeforeEach1_Before_Test.TUnit_TestProject_BeforeTests_AssemblyBase1_BeforeEach1_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_AssemblyBase1_BeforeEach1_0Params_Body + } +); } } @@ -148,50 +153,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblyBase2_BeforeAll2_Before_Assembly; -internal static class TUnit_TestProject_BeforeTests_AssemblyBase2_BeforeAll2_Before_AssemblyInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblyBase2_BeforeAll2_Before_Assembly { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_AssemblyBase2_BeforeAll2_Before_AssemblyInitializer { - var TestsBase`1_assembly = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase2).Assembly; - global::TUnit.Core.Sources.BeforeAssemblyHooks.GetOrAdd(TestsBase`1_assembly, static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeAssemblyHooks[TestsBase`1_assembly].Add( - new BeforeAssemblyHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblyBase2_BeforeAll2_0Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.AssemblyBase2.BeforeAll2()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_AssemblyBase2_BeforeAll2_Before_Assembly = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeAssemblyHooks, typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase2).Assembly, + new BeforeAssemblyHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase2)), + Name = "BeforeAll2", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblyBase2", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase2)), - Name = "BeforeAll2", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblyBase2", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase2)), - Name = "AssemblyBase2", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeAssemblyHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_AssemblyBase2_BeforeAll2_0Params_Body, - FilePath = @"", - LineNumber = 20 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblyBase2_BeforeAll2_0Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.AssemblyBase2.BeforeAll2()); + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase2)), + Name = "AssemblyBase2", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeAssemblyHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblyBase2_BeforeAll2_Before_Assembly.TUnit_TestProject_BeforeTests_AssemblyBase2_BeforeAll2_Before_AssemblyInitializer.global_TUnit_TestProject_BeforeTests_AssemblyBase2_BeforeAll2_0Params_Body, + FilePath = @"", + LineNumber = 20 + } +); } } @@ -215,49 +222,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblyBase2_BeforeEach2_Before_Test; -internal static class TUnit_TestProject_BeforeTests_AssemblyBase2_BeforeEach2_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblyBase2_BeforeEach2_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_AssemblyBase2_BeforeEach2_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblyBase2_BeforeEach2_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.AssemblyBase2)instance; + await AsyncConvert.Convert(() => typedInstance.BeforeEach2()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_AssemblyBase2_BeforeEach2_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase2), + new InstanceHookMethod { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase2), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase2)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase2), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase2)), + Name = "BeforeEach2", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblyBase2", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase2), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase2)), - Name = "BeforeEach2", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblyBase2", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase2)), - Name = "AssemblyBase2", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_AssemblyBase2_BeforeEach2_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblyBase2_BeforeEach2_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.AssemblyBase2)instance; - await AsyncConvert.Convert(() => typedInstance.BeforeEach2()); + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase2)), + Name = "AssemblyBase2", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblyBase2_BeforeEach2_Before_Test.TUnit_TestProject_BeforeTests_AssemblyBase2_BeforeEach2_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_AssemblyBase2_BeforeEach2_0Params_Body + } +); } } @@ -281,50 +291,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblyBase3_BeforeAll3_Before_Assembly; -internal static class TUnit_TestProject_BeforeTests_AssemblyBase3_BeforeAll3_Before_AssemblyInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblyBase3_BeforeAll3_Before_Assembly +{ + internal static class TUnit_TestProject_BeforeTests_AssemblyBase3_BeforeAll3_Before_AssemblyInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblyBase3_BeforeAll3_0Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.AssemblyBase3.BeforeAll3()); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_AssemblyBase3_BeforeAll3_Before_Assembly = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeAssemblyHooks, typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase3).Assembly, + new BeforeAssemblyHookMethod { - var TestsBase`1_assembly = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase3).Assembly; - global::TUnit.Core.Sources.BeforeAssemblyHooks.GetOrAdd(TestsBase`1_assembly, static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeAssemblyHooks[TestsBase`1_assembly].Add( - new BeforeAssemblyHookMethod + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase3)), + Name = "BeforeAll3", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblyBase3", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase3)), - Name = "BeforeAll3", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblyBase3", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase3)), - Name = "AssemblyBase3", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeAssemblyHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_AssemblyBase3_BeforeAll3_0Params_Body, - FilePath = @"", - LineNumber = 35 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblyBase3_BeforeAll3_0Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.AssemblyBase3.BeforeAll3()); + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase3)), + Name = "AssemblyBase3", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeAssemblyHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblyBase3_BeforeAll3_Before_Assembly.TUnit_TestProject_BeforeTests_AssemblyBase3_BeforeAll3_Before_AssemblyInitializer.global_TUnit_TestProject_BeforeTests_AssemblyBase3_BeforeAll3_0Params_Body, + FilePath = @"", + LineNumber = 35 + } +); } } @@ -348,49 +360,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblyBase3_BeforeEach3_Before_Test; -internal static class TUnit_TestProject_BeforeTests_AssemblyBase3_BeforeEach3_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblyBase3_BeforeEach3_Before_Test +{ + internal static class TUnit_TestProject_BeforeTests_AssemblyBase3_BeforeEach3_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblyBase3_BeforeEach3_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.AssemblyBase3)instance; + await AsyncConvert.Convert(() => typedInstance.BeforeEach3()); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase3), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase3)].Add( - new InstanceHookMethod + static readonly int _h_TUnit_TestProject_BeforeTests_AssemblyBase3_BeforeEach3_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase3), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase3), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase3)), + Name = "BeforeEach3", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblyBase3", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase3), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase3)), - Name = "BeforeEach3", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblyBase3", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase3)), - Name = "AssemblyBase3", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_AssemblyBase3_BeforeEach3_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblyBase3_BeforeEach3_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.AssemblyBase3)instance; - await AsyncConvert.Convert(() => typedInstance.BeforeEach3()); + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblyBase3)), + Name = "AssemblyBase3", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblyBase3_BeforeEach3_Before_Test.TUnit_TestProject_BeforeTests_AssemblyBase3_BeforeEach3_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_AssemblyBase3_BeforeEach3_0Params_Body + } +); } } @@ -414,50 +429,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUp_Before_Assembly; -internal static class TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUp_Before_AssemblyInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUp_Before_Assembly +{ + internal static class TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUp_Before_AssemblyInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUp_0Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.AssemblySetupTests.BeforeAllSetUp()); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration { - var TestsBase`1_assembly = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests).Assembly; - global::TUnit.Core.Sources.BeforeAssemblyHooks.GetOrAdd(TestsBase`1_assembly, static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeAssemblyHooks[TestsBase`1_assembly].Add( - new BeforeAssemblyHookMethod + static readonly int _h_TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUp_Before_Assembly = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeAssemblyHooks, typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests).Assembly, + new BeforeAssemblyHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), + Name = "BeforeAllSetUp", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblySetupTests", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), - Name = "BeforeAllSetUp", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblySetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), - Name = "AssemblySetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeAssemblyHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUp_0Params_Body, - FilePath = @"", - LineNumber = 50 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUp_0Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.AssemblySetupTests.BeforeAllSetUp()); + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), + Name = "AssemblySetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeAssemblyHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUp_Before_Assembly.TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUp_Before_AssemblyInitializer.global_TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUp_0Params_Body, + FilePath = @"", + LineNumber = 50 + } +); } } @@ -481,53 +498,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUpWithContext__AssemblyHookContext_Before_Assembly; -internal static class TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUpWithContext__AssemblyHookContext_Before_AssemblyInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUpWithContext__AssemblyHookContext_Before_Assembly { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUpWithContext__AssemblyHookContext_Before_AssemblyInitializer { - var TestsBase`1_assembly = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests).Assembly; - global::TUnit.Core.Sources.BeforeAssemblyHooks.GetOrAdd(TestsBase`1_assembly, static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeAssemblyHooks[TestsBase`1_assembly].Add( - new BeforeAssemblyHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUpWithContext_1Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.AssemblySetupTests.BeforeAllSetUpWithContext(context)); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUpWithContext__AssemblyHookContext_Before_Assembly = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeAssemblyHooks, typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests).Assembly, + new BeforeAssemblyHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), + Name = "BeforeAllSetUpWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.AssemblyHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.AssemblyHookContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.AssemblyHookContext) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblySetupTests", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), - Name = "BeforeAllSetUpWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.AssemblyHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.AssemblyHookContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.AssemblyHookContext) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblySetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), - Name = "AssemblySetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeAssemblyHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUpWithContext_1Params_Body, - FilePath = @"", - LineNumber = 56 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUpWithContext_1Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.AssemblySetupTests.BeforeAllSetUpWithContext(context)); + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), + Name = "AssemblySetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeAssemblyHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUpWithContext__AssemblyHookContext_Before_Assembly.TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUpWithContext__AssemblyHookContext_Before_AssemblyInitializer.global_TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUpWithContext_1Params_Body, + FilePath = @"", + LineNumber = 56 + } +); } } @@ -551,50 +570,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUp2_Before_Assembly; -internal static class TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUp2_Before_AssemblyInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUp2_Before_Assembly { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUp2_Before_AssemblyInitializer { - var TestsBase`1_assembly = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests).Assembly; - global::TUnit.Core.Sources.BeforeAssemblyHooks.GetOrAdd(TestsBase`1_assembly, static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeAssemblyHooks[TestsBase`1_assembly].Add( - new BeforeAssemblyHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUp2_0Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.AssemblySetupTests.BeforeAllSetUp2()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUp2_Before_Assembly = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeAssemblyHooks, typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests).Assembly, + new BeforeAssemblyHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), + Name = "BeforeAllSetUp2", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblySetupTests", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), - Name = "BeforeAllSetUp2", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblySetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), - Name = "AssemblySetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeAssemblyHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUp2_0Params_Body, - FilePath = @"", - LineNumber = 62 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUp2_0Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.AssemblySetupTests.BeforeAllSetUp2()); + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), + Name = "AssemblySetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeAssemblyHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUp2_Before_Assembly.TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUp2_Before_AssemblyInitializer.global_TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUp2_0Params_Body, + FilePath = @"", + LineNumber = 62 + } +); } } @@ -618,54 +639,56 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUpWithContext__AssemblyHookContext_CancellationToken_Before_Assembly; -internal static class TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUpWithContext__AssemblyHookContext_CancellationToken_Before_AssemblyInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUpWithContext__AssemblyHookContext_CancellationToken_Before_Assembly +{ + internal static class TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUpWithContext__AssemblyHookContext_CancellationToken_Before_AssemblyInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUpWithContext_2Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.AssemblySetupTests.BeforeAllSetUpWithContext(context, cancellationToken)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration { - var TestsBase`1_assembly = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests).Assembly; - global::TUnit.Core.Sources.BeforeAssemblyHooks.GetOrAdd(TestsBase`1_assembly, static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeAssemblyHooks[TestsBase`1_assembly].Add( - new BeforeAssemblyHookMethod + static readonly int _h_TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUpWithContext__AssemblyHookContext_CancellationToken_Before_Assembly = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeAssemblyHooks, typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests).Assembly, + new BeforeAssemblyHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), + Name = "BeforeAllSetUpWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.AssemblyHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.AssemblyHookContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.AssemblyHookContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.AssemblyHookContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblySetupTests", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), - Name = "BeforeAllSetUpWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.AssemblyHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.AssemblyHookContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.AssemblyHookContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.AssemblyHookContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblySetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), - Name = "AssemblySetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeAssemblyHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUpWithContext_2Params_Body, - FilePath = @"", - LineNumber = 68 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUpWithContext_2Params_Body(AssemblyHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.AssemblySetupTests.BeforeAllSetUpWithContext(context, cancellationToken)); + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), + Name = "AssemblySetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeAssemblyHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUpWithContext__AssemblyHookContext_CancellationToken_Before_Assembly.TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUpWithContext__AssemblyHookContext_CancellationToken_Before_AssemblyInitializer.global_TUnit_TestProject_BeforeTests_AssemblySetupTests_BeforeAllSetUpWithContext_2Params_Body, + FilePath = @"", + LineNumber = 68 + } +); } } @@ -689,49 +712,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblySetupTests_Setup_Before_Test; -internal static class TUnit_TestProject_BeforeTests_AssemblySetupTests_Setup_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblySetupTests_Setup_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_AssemblySetupTests_Setup_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblySetupTests_Setup_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.AssemblySetupTests)instance; + await AsyncConvert.Convert(() => typedInstance.Setup()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_AssemblySetupTests_Setup_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), + new InstanceHookMethod { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), + Name = "Setup", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblySetupTests", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), - Name = "Setup", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblySetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), - Name = "AssemblySetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_AssemblySetupTests_Setup_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblySetupTests_Setup_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.AssemblySetupTests)instance; - await AsyncConvert.Convert(() => typedInstance.Setup()); + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), + Name = "AssemblySetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblySetupTests_Setup_Before_Test.TUnit_TestProject_BeforeTests_AssemblySetupTests_Setup_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_AssemblySetupTests_Setup_0Params_Body + } +); } } @@ -755,52 +781,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblySetupTests_Setup__CancellationToken_Before_Test; -internal static class TUnit_TestProject_BeforeTests_AssemblySetupTests_Setup__CancellationToken_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblySetupTests_Setup__CancellationToken_Before_Test +{ + internal static class TUnit_TestProject_BeforeTests_AssemblySetupTests_Setup__CancellationToken_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblySetupTests_Setup_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.AssemblySetupTests)instance; + await AsyncConvert.Convert(() => typedInstance.Setup(cancellationToken)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_AssemblySetupTests_Setup__CancellationToken_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), + new InstanceHookMethod { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), + Name = "Setup", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), - Name = "Setup", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests).GetMethod("Setup", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblySetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), - Name = "AssemblySetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_AssemblySetupTests_Setup_1Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblySetupTests_Setup_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.AssemblySetupTests)instance; - await AsyncConvert.Convert(() => typedInstance.Setup(cancellationToken)); + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests).GetMethod("Setup", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblySetupTests", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), + Name = "AssemblySetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblySetupTests_Setup__CancellationToken_Before_Test.TUnit_TestProject_BeforeTests_AssemblySetupTests_Setup__CancellationToken_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_AssemblySetupTests_Setup_1Params_Body + } +); } } @@ -824,52 +853,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblySetupTests_SetupWithContext__TestContext_Before_Test; -internal static class TUnit_TestProject_BeforeTests_AssemblySetupTests_SetupWithContext__TestContext_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblySetupTests_SetupWithContext__TestContext_Before_Test +{ + internal static class TUnit_TestProject_BeforeTests_AssemblySetupTests_SetupWithContext__TestContext_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblySetupTests_SetupWithContext_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.AssemblySetupTests)instance; + await AsyncConvert.Convert(() => typedInstance.SetupWithContext(context)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_AssemblySetupTests_SetupWithContext__TestContext_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), + new InstanceHookMethod { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), + Name = "SetupWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblySetupTests", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), - Name = "SetupWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblySetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), - Name = "AssemblySetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_AssemblySetupTests_SetupWithContext_1Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblySetupTests_SetupWithContext_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.AssemblySetupTests)instance; - await AsyncConvert.Convert(() => typedInstance.SetupWithContext(context)); + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), + Name = "AssemblySetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblySetupTests_SetupWithContext__TestContext_Before_Test.TUnit_TestProject_BeforeTests_AssemblySetupTests_SetupWithContext__TestContext_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_AssemblySetupTests_SetupWithContext_1Params_Body + } +); } } @@ -893,52 +925,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblySetupTests_SetupWithContext__TestContext_CancellationToken_Before_Test; -internal static class TUnit_TestProject_BeforeTests_AssemblySetupTests_SetupWithContext__TestContext_CancellationToken_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblySetupTests_SetupWithContext__TestContext_CancellationToken_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_AssemblySetupTests_SetupWithContext__TestContext_CancellationToken_Before_TestInitializer { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)].Add( - new InstanceHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblySetupTests_SetupWithContext_2Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.AssemblySetupTests)instance; + await AsyncConvert.Convert(() => typedInstance.SetupWithContext(context, cancellationToken)); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_AssemblySetupTests_SetupWithContext__TestContext_CancellationToken_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), + Name = "SetupWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), - Name = "SetupWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblySetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), - Name = "AssemblySetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_AssemblySetupTests_SetupWithContext_2Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_AssemblySetupTests_SetupWithContext_2Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.AssemblySetupTests)instance; - await AsyncConvert.Convert(() => typedInstance.SetupWithContext(context, cancellationToken)); + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.AssemblySetupTests", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.AssemblySetupTests)), + Name = "AssemblySetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_AssemblySetupTests_SetupWithContext__TestContext_CancellationToken_Before_Test.TUnit_TestProject_BeforeTests_AssemblySetupTests_SetupWithContext__TestContext_CancellationToken_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_AssemblySetupTests_SetupWithContext_2Params_Body + } +); } } diff --git a/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet10_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet10_0.verified.txt index 886335f4bc..541c2796f2 100644 --- a/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet10_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet10_0.verified.txt @@ -200,9 +200,8 @@ internal static class TUnit_TestProject_BasicTests__TestSource { return new global::TUnit.TestProject.BasicTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_BasicTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet8_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet8_0.verified.txt index 886335f4bc..541c2796f2 100644 --- a/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet8_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet8_0.verified.txt @@ -200,9 +200,8 @@ internal static class TUnit_TestProject_BasicTests__TestSource { return new global::TUnit.TestProject.BasicTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_BasicTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet9_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet9_0.verified.txt index 886335f4bc..541c2796f2 100644 --- a/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet9_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet9_0.verified.txt @@ -200,9 +200,8 @@ internal static class TUnit_TestProject_BasicTests__TestSource { return new global::TUnit.TestProject.BasicTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_BasicTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.Net4_7.verified.txt b/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.Net4_7.verified.txt index 3df345393b..a791373b8c 100644 --- a/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.Net4_7.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.Net4_7.verified.txt @@ -200,9 +200,8 @@ internal static class TUnit_TestProject_BasicTests__TestSource { return new global::TUnit.TestProject.BasicTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_BasicTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/AsyncMethodDataSourceDrivenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/AsyncMethodDataSourceDrivenTests.Test.verified.txt index aa3814ec29..4a45c27feb 100644 --- a/TUnit.Core.SourceGenerator.Tests/AsyncMethodDataSourceDrivenTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/AsyncMethodDataSourceDrivenTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -866,9 +866,8 @@ internal static class TUnit_TestProject_AsyncMethodDataSourceDrivenTests__TestSo { return new global::TUnit.TestProject.AsyncMethodDataSourceDrivenTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.AsyncMethodDataSourceDrivenTests), TUnit_TestProject_AsyncMethodDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_AsyncMethodDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_AsyncMethodDataSourceDrivenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.AsyncMethodDataSourceDrivenTests), TUnit_TestProject_AsyncMethodDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_AsyncMethodDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/AttributeTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/AttributeTests.Test.verified.txt index ed535c45e1..2f923e958c 100644 --- a/TUnit.Core.SourceGenerator.Tests/AttributeTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/AttributeTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -104,9 +104,8 @@ internal static class TUnit_TestProject_AttributeTests__TestSource { return new global::TUnit.TestProject.AttributeTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.AttributeTests), TUnit_TestProject_AttributeTests__TestSource.GetTests, TUnit_TestProject_AttributeTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_AttributeTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.AttributeTests), TUnit_TestProject_AttributeTests__TestSource.GetTests, TUnit_TestProject_AttributeTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet10_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet10_0.verified.txt index 886335f4bc..541c2796f2 100644 --- a/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet10_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet10_0.verified.txt @@ -200,9 +200,8 @@ internal static class TUnit_TestProject_BasicTests__TestSource { return new global::TUnit.TestProject.BasicTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_BasicTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet8_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet8_0.verified.txt index 886335f4bc..541c2796f2 100644 --- a/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet8_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet8_0.verified.txt @@ -200,9 +200,8 @@ internal static class TUnit_TestProject_BasicTests__TestSource { return new global::TUnit.TestProject.BasicTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_BasicTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet9_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet9_0.verified.txt index 886335f4bc..541c2796f2 100644 --- a/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet9_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet9_0.verified.txt @@ -200,9 +200,8 @@ internal static class TUnit_TestProject_BasicTests__TestSource { return new global::TUnit.TestProject.BasicTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_BasicTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.Net4_7.verified.txt b/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.Net4_7.verified.txt index 3df345393b..a791373b8c 100644 --- a/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.Net4_7.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.Net4_7.verified.txt @@ -200,9 +200,8 @@ internal static class TUnit_TestProject_BasicTests__TestSource { return new global::TUnit.TestProject.BasicTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_BasicTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/BeforeAllTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/BeforeAllTests.Test.verified.txt index b0a9db569f..cd08cb2abf 100644 --- a/TUnit.Core.SourceGenerator.Tests/BeforeAllTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/BeforeAllTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -145,9 +145,8 @@ internal static class TUnit_TestProject_BeforeTests_SetupTests__TestSource { return new global::TUnit.TestProject.BeforeTests.SetupTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), TUnit_TestProject_BeforeTests_SetupTests__TestSource.GetTests, TUnit_TestProject_BeforeTests_SetupTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_BeforeTests_SetupTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), TUnit_TestProject_BeforeTests_SetupTests__TestSource.GetTests, TUnit_TestProject_BeforeTests_SetupTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/BeforeTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/BeforeTests.Test.verified.txt index b0a9db569f..cd08cb2abf 100644 --- a/TUnit.Core.SourceGenerator.Tests/BeforeTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/BeforeTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -145,9 +145,8 @@ internal static class TUnit_TestProject_BeforeTests_SetupTests__TestSource { return new global::TUnit.TestProject.BeforeTests.SetupTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), TUnit_TestProject_BeforeTests_SetupTests__TestSource.GetTests, TUnit_TestProject_BeforeTests_SetupTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_BeforeTests_SetupTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), TUnit_TestProject_BeforeTests_SetupTests__TestSource.GetTests, TUnit_TestProject_BeforeTests_SetupTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet10_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet10_0.verified.txt index 22ba64d78e..33bd089a01 100644 --- a/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet10_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet10_0.verified.txt @@ -93,9 +93,8 @@ internal static class TUnit_TestProject_Bugs__2971_Tests__TestSource { return new global::TUnit.TestProject.Bugs._2971.Tests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._2971.Tests), TUnit_TestProject_Bugs__2971_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__2971_Tests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_Bugs__2971_Tests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._2971.Tests), TUnit_TestProject_Bugs__2971_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__2971_Tests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet8_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet8_0.verified.txt index 22ba64d78e..33bd089a01 100644 --- a/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet8_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet8_0.verified.txt @@ -93,9 +93,8 @@ internal static class TUnit_TestProject_Bugs__2971_Tests__TestSource { return new global::TUnit.TestProject.Bugs._2971.Tests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._2971.Tests), TUnit_TestProject_Bugs__2971_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__2971_Tests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_Bugs__2971_Tests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._2971.Tests), TUnit_TestProject_Bugs__2971_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__2971_Tests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet9_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet9_0.verified.txt index 22ba64d78e..33bd089a01 100644 --- a/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet9_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet9_0.verified.txt @@ -93,9 +93,8 @@ internal static class TUnit_TestProject_Bugs__2971_Tests__TestSource { return new global::TUnit.TestProject.Bugs._2971.Tests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._2971.Tests), TUnit_TestProject_Bugs__2971_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__2971_Tests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_Bugs__2971_Tests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._2971.Tests), TUnit_TestProject_Bugs__2971_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__2971_Tests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.Net4_7.verified.txt b/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.Net4_7.verified.txt index a1b8861398..ade39c0db1 100644 --- a/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.Net4_7.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.Net4_7.verified.txt @@ -93,9 +93,8 @@ internal static class TUnit_TestProject_Bugs__2971_Tests__TestSource { return new global::TUnit.TestProject.Bugs._2971.Tests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._2971.Tests), TUnit_TestProject_Bugs__2971_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__2971_Tests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_Bugs__2971_Tests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._2971.Tests), TUnit_TestProject_Bugs__2971_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__2971_Tests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ClassAndMethodArgumentsTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ClassAndMethodArgumentsTests.Test.verified.txt index ff072aec45..915f45d724 100644 --- a/TUnit.Core.SourceGenerator.Tests/ClassAndMethodArgumentsTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ClassAndMethodArgumentsTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -291,9 +291,8 @@ internal static class TUnit_TestProject_ClassAndMethodArgumentsTests__TestSource { return new global::TUnit.TestProject.ClassAndMethodArgumentsTests(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.ClassAndMethodArgumentsTests), TUnit_TestProject_ClassAndMethodArgumentsTests__TestSource.GetTests, TUnit_TestProject_ClassAndMethodArgumentsTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_ClassAndMethodArgumentsTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.ClassAndMethodArgumentsTests), TUnit_TestProject_ClassAndMethodArgumentsTests__TestSource.GetTests, TUnit_TestProject_ClassAndMethodArgumentsTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ClassConstructorTest.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ClassConstructorTest.Test.verified.txt index c0e8ff4f77..0f027d8923 100644 --- a/TUnit.Core.SourceGenerator.Tests/ClassConstructorTest.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ClassConstructorTest.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -126,9 +126,8 @@ internal static class TUnit_TestProject_ClassConstructorTest__TestSource // ClassConstructor attribute is present - instance creation handled at runtime throw new global::System.NotSupportedException("Instance creation for classes with ClassConstructor attribute is handled at runtime"); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.ClassConstructorTest), TUnit_TestProject_ClassConstructorTest__TestSource.GetTests, TUnit_TestProject_ClassConstructorTest__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_ClassConstructorTest__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.ClassConstructorTest), TUnit_TestProject_ClassConstructorTest__TestSource.GetTests, TUnit_TestProject_ClassConstructorTest__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests.Test.verified.txt index afbb804bb5..a9a6eb7e43 100644 --- a/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -592,9 +592,8 @@ internal static class TUnit_TestProject_ClassDataSourceDrivenTests__TestSource { return new global::TUnit.TestProject.ClassDataSourceDrivenTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.ClassDataSourceDrivenTests), TUnit_TestProject_ClassDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_ClassDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_ClassDataSourceDrivenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.ClassDataSourceDrivenTests), TUnit_TestProject_ClassDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_ClassDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests2.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests2.Test.verified.txt index 557dccebfa..52d98dfbfc 100644 --- a/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests2.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests2.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -179,9 +179,8 @@ internal static class TUnit_TestProject_ClassDataSourceDrivenTests2__TestSource { return new global::TUnit.TestProject.ClassDataSourceDrivenTests2(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.ClassDataSourceDrivenTests2), TUnit_TestProject_ClassDataSourceDrivenTests2__TestSource.GetTests, TUnit_TestProject_ClassDataSourceDrivenTests2__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_ClassDataSourceDrivenTests2__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.ClassDataSourceDrivenTests2), TUnit_TestProject_ClassDataSourceDrivenTests2__TestSource.GetTests, TUnit_TestProject_ClassDataSourceDrivenTests2__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTestsSharedKeyed.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTestsSharedKeyed.Test.verified.txt index a29ac26902..fb4233e256 100644 --- a/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTestsSharedKeyed.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTestsSharedKeyed.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -196,9 +196,8 @@ internal static class TUnit_TestProject_ClassDataSourceDrivenTestsSharedKeyed__T { return new global::TUnit.TestProject.ClassDataSourceDrivenTestsSharedKeyed(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.ClassDataSourceDrivenTestsSharedKeyed), TUnit_TestProject_ClassDataSourceDrivenTestsSharedKeyed__TestSource.GetTests, TUnit_TestProject_ClassDataSourceDrivenTestsSharedKeyed__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_ClassDataSourceDrivenTestsSharedKeyed__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.ClassDataSourceDrivenTestsSharedKeyed), TUnit_TestProject_ClassDataSourceDrivenTestsSharedKeyed__TestSource.GetTests, TUnit_TestProject_ClassDataSourceDrivenTestsSharedKeyed__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ClassTupleDataSourceDrivenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ClassTupleDataSourceDrivenTests.Test.verified.txt index 96502b81eb..b37b1a5fe7 100644 --- a/TUnit.Core.SourceGenerator.Tests/ClassTupleDataSourceDrivenTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ClassTupleDataSourceDrivenTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -615,9 +615,8 @@ internal static class TUnit_TestProject_ClassTupleDataSourceDrivenTests__TestSou Property4 = default(global::System.ValueTuple), }; } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.ClassTupleDataSourceDrivenTests), TUnit_TestProject_ClassTupleDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_ClassTupleDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_ClassTupleDataSourceDrivenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.ClassTupleDataSourceDrivenTests), TUnit_TestProject_ClassTupleDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_ClassTupleDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ConcreteClassTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConcreteClassTests.Test.verified.txt index a334906dc0..9d37c10762 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConcreteClassTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConcreteClassTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -94,11 +94,10 @@ internal static class TUnit_TestProject_AbstractTests_ConcreteClass2__TestSource { return new global::TUnit.TestProject.AbstractTests.ConcreteClass2(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass2), TUnit_TestProject_AbstractTests_ConcreteClass2__TestSource.GetTests, TUnit_TestProject_AbstractTests_ConcreteClass2__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_AbstractTests_ConcreteClass2__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass2), TUnit_TestProject_AbstractTests_ConcreteClass2__TestSource.GetTests, TUnit_TestProject_AbstractTests_ConcreteClass2__TestSource.EnumerateTestDescriptors); } @@ -199,13 +198,9 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClass } } } -internal static class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClassName_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass2), new TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClassName_TestSource()); - } + static readonly int _r_TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClassName_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass2), new TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClassName_TestSource()); } @@ -305,11 +300,7 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClass } } } -internal static class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass1), new TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource()); - } + static readonly int _r_TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass1), new TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource()); } diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.DotNet10_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.DotNet10_0.verified.txt index 886335f4bc..541c2796f2 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.DotNet10_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.DotNet10_0.verified.txt @@ -200,9 +200,8 @@ internal static class TUnit_TestProject_BasicTests__TestSource { return new global::TUnit.TestProject.BasicTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_BasicTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.DotNet8_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.DotNet8_0.verified.txt index 886335f4bc..541c2796f2 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.DotNet8_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.DotNet8_0.verified.txt @@ -200,9 +200,8 @@ internal static class TUnit_TestProject_BasicTests__TestSource { return new global::TUnit.TestProject.BasicTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_BasicTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.DotNet9_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.DotNet9_0.verified.txt index 886335f4bc..541c2796f2 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.DotNet9_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.DotNet9_0.verified.txt @@ -200,9 +200,8 @@ internal static class TUnit_TestProject_BasicTests__TestSource { return new global::TUnit.TestProject.BasicTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_BasicTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.Net4_7.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.Net4_7.verified.txt index 3df345393b..a791373b8c 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.Net4_7.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.Net4_7.verified.txt @@ -200,9 +200,8 @@ internal static class TUnit_TestProject_BasicTests__TestSource { return new global::TUnit.TestProject.BasicTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_BasicTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet10_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet10_0.verified.txt index 7849d6c864..7e2f85dd6a 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet10_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet10_0.verified.txt @@ -826,9 +826,8 @@ internal static class TUnit_TestProject_DataDrivenTests__TestSource { return new global::TUnit.TestProject.DataDrivenTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.DataDrivenTests), TUnit_TestProject_DataDrivenTests__TestSource.GetTests, TUnit_TestProject_DataDrivenTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_DataDrivenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.DataDrivenTests), TUnit_TestProject_DataDrivenTests__TestSource.GetTests, TUnit_TestProject_DataDrivenTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet8_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet8_0.verified.txt index 7849d6c864..7e2f85dd6a 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet8_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet8_0.verified.txt @@ -826,9 +826,8 @@ internal static class TUnit_TestProject_DataDrivenTests__TestSource { return new global::TUnit.TestProject.DataDrivenTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.DataDrivenTests), TUnit_TestProject_DataDrivenTests__TestSource.GetTests, TUnit_TestProject_DataDrivenTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_DataDrivenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.DataDrivenTests), TUnit_TestProject_DataDrivenTests__TestSource.GetTests, TUnit_TestProject_DataDrivenTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet9_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet9_0.verified.txt index 7849d6c864..7e2f85dd6a 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet9_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet9_0.verified.txt @@ -826,9 +826,8 @@ internal static class TUnit_TestProject_DataDrivenTests__TestSource { return new global::TUnit.TestProject.DataDrivenTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.DataDrivenTests), TUnit_TestProject_DataDrivenTests__TestSource.GetTests, TUnit_TestProject_DataDrivenTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_DataDrivenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.DataDrivenTests), TUnit_TestProject_DataDrivenTests__TestSource.GetTests, TUnit_TestProject_DataDrivenTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.Net4_7.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.Net4_7.verified.txt index 91ebc6d8b6..7aa0e643fa 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.Net4_7.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.Net4_7.verified.txt @@ -826,9 +826,8 @@ internal static class TUnit_TestProject_DataDrivenTests__TestSource { return new global::TUnit.TestProject.DataDrivenTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.DataDrivenTests), TUnit_TestProject_DataDrivenTests__TestSource.GetTests, TUnit_TestProject_DataDrivenTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_DataDrivenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.DataDrivenTests), TUnit_TestProject_DataDrivenTests__TestSource.GetTests, TUnit_TestProject_DataDrivenTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.DotNet10_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.DotNet10_0.verified.txt index ea0821d0d9..9540ecd25b 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.DotNet10_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.DotNet10_0.verified.txt @@ -15,49 +15,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_Class; -internal static class TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_Class { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_ClassInitializer { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.Base1), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.Base1)].Add( - new BeforeClassHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_Base1_BeforeAll1_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.Base1.BeforeAll1()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.Base1), + new BeforeClassHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), + Name = "BeforeAll1", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base1", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), - Name = "BeforeAll1", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base1", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), - Name = "Base1", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_Base1_BeforeAll1_0Params_Body, - FilePath = @"", - LineNumber = 5 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_Base1_BeforeAll1_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.Base1.BeforeAll1()); + Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), + Name = "Base1", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_Class.TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_Base1_BeforeAll1_0Params_Body, + FilePath = @"", + LineNumber = 5 + } +); } } @@ -81,49 +84,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_Test; -internal static class TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_TestInitializer { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.Base1), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.Base1)].Add( - new InstanceHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_Base1_BeforeEach1_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.Base1)instance; + await AsyncConvert.Convert(() => typedInstance.BeforeEach1()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.Base1), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base1), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), + Name = "BeforeEach1", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base1", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base1), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), - Name = "BeforeEach1", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base1", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), - Name = "Base1", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_Base1_BeforeEach1_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_Base1_BeforeEach1_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.Base1)instance; - await AsyncConvert.Convert(() => typedInstance.BeforeEach1()); + Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), + Name = "Base1", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_Test.TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_Base1_BeforeEach1_0Params_Body + } +); } } @@ -147,49 +153,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_Class; -internal static class TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_Class { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_ClassInitializer { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.Base2), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.Base2)].Add( - new BeforeClassHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_Base2_BeforeAll2_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.Base2.BeforeAll2()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.Base2), + new BeforeClassHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), + Name = "BeforeAll2", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base2", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), - Name = "BeforeAll2", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base2", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), - Name = "Base2", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_Base2_BeforeAll2_0Params_Body, - FilePath = @"", - LineNumber = 20 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_Base2_BeforeAll2_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.Base2.BeforeAll2()); + Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), + Name = "Base2", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_Class.TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_Base2_BeforeAll2_0Params_Body, + FilePath = @"", + LineNumber = 20 + } +); } } @@ -213,49 +222,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_Test; -internal static class TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_Base2_BeforeEach2_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.Base2)instance; + await AsyncConvert.Convert(() => typedInstance.BeforeEach2()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.Base2), + new InstanceHookMethod { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.Base2), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.Base2)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base2), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), + Name = "BeforeEach2", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base2", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base2), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), - Name = "BeforeEach2", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base2", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), - Name = "Base2", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_Base2_BeforeEach2_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_Base2_BeforeEach2_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.Base2)instance; - await AsyncConvert.Convert(() => typedInstance.BeforeEach2()); + Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), + Name = "Base2", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_Test.TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_Base2_BeforeEach2_0Params_Body + } +); } } @@ -279,49 +291,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_Class; -internal static class TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_Class +{ + internal static class TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_ClassInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_Base3_BeforeAll3_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.Base3.BeforeAll3()); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.Base3), + new BeforeClassHookMethod { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.Base3), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.Base3)].Add( - new BeforeClassHookMethod + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), + Name = "BeforeAll3", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base3", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), - Name = "BeforeAll3", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base3", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), - Name = "Base3", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_Base3_BeforeAll3_0Params_Body, - FilePath = @"", - LineNumber = 35 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_Base3_BeforeAll3_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.Base3.BeforeAll3()); + Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), + Name = "Base3", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_Class.TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_Base3_BeforeAll3_0Params_Body, + FilePath = @"", + LineNumber = 35 + } +); } } @@ -345,49 +360,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_Test; -internal static class TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_Test +{ + internal static class TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_Base3_BeforeEach3_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.Base3)instance; + await AsyncConvert.Convert(() => typedInstance.BeforeEach3()); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.Base3), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.Base3)].Add( - new InstanceHookMethod + static readonly int _h_TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.Base3), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base3), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), + Name = "BeforeEach3", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base3", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base3), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), - Name = "BeforeEach3", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base3", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), - Name = "Base3", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_Base3_BeforeEach3_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_Base3_BeforeEach3_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.Base3)instance; - await AsyncConvert.Convert(() => typedInstance.BeforeEach3()); + Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), + Name = "Base3", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_Test.TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_Base3_BeforeEach3_0Params_Body + } +); } } @@ -411,49 +429,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_Class; -internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_Class +{ + internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_ClassInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUp()); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new BeforeClassHookMethod + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new BeforeClassHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "BeforeAllSetUp", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "BeforeAllSetUp", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_0Params_Body, - FilePath = @"", - LineNumber = 50 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUp()); + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_Class.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_0Params_Body, + FilePath = @"", + LineNumber = 50 + } +); } } @@ -477,52 +498,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_Class; -internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_Class +{ + internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_ClassInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_1Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUpWithContext(context)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new BeforeClassHookMethod { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new BeforeClassHookMethod + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "BeforeAllSetUpWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.ClassHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.ClassHookContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.ClassHookContext) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "BeforeAllSetUpWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.ClassHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.ClassHookContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.ClassHookContext) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_1Params_Body, - FilePath = @"", - LineNumber = 56 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_1Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUpWithContext(context)); + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_Class.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_1Params_Body, + FilePath = @"", + LineNumber = 56 + } +); } } @@ -546,52 +570,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_Class; -internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_Class +{ + internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_ClassInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_1Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUp(cancellationToken)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new BeforeClassHookMethod { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new BeforeClassHookMethod + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "BeforeAllSetUp", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "BeforeAllSetUp", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_1Params_Body, - FilePath = @"", - LineNumber = 62 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_1Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUp(cancellationToken)); + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_Class.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_1Params_Body, + FilePath = @"", + LineNumber = 62 + } +); } } @@ -615,53 +642,56 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_Class; -internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_Class { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_ClassInitializer { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new BeforeClassHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_2Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUpWithContext(context, cancellationToken)); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new BeforeClassHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "BeforeAllSetUpWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.ClassHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.ClassHookContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.ClassHookContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.ClassHookContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "BeforeAllSetUpWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.ClassHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.ClassHookContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.ClassHookContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.ClassHookContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_2Params_Body, - FilePath = @"", - LineNumber = 68 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_2Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUpWithContext(context, cancellationToken)); + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_Class.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_2Params_Body, + FilePath = @"", + LineNumber = 68 + } +); } } @@ -685,49 +715,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_Test; -internal static class TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_Setup_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; + await AsyncConvert.Convert(() => typedInstance.Setup()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new InstanceHookMethod { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "Setup", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "Setup", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_Setup_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_Setup_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; - await AsyncConvert.Convert(() => typedInstance.Setup()); + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_Test.TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_Setup_0Params_Body + } +); } } @@ -751,52 +784,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_Test; -internal static class TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_Test +{ + internal static class TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_Setup_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; + await AsyncConvert.Convert(() => typedInstance.Setup(cancellationToken)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new InstanceHookMethod { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "Setup", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "Setup", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("Setup", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_Setup_1Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_Setup_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; - await AsyncConvert.Convert(() => typedInstance.Setup(cancellationToken)); + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("Setup", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_Test.TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_Setup_1Params_Body + } +); } } @@ -820,52 +856,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_Test; -internal static class TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_Test +{ + internal static class TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; + await AsyncConvert.Convert(() => typedInstance.SetupWithContext(context)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new InstanceHookMethod { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_1Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; - await AsyncConvert.Convert(() => typedInstance.SetupWithContext(context)); + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_Test.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_1Params_Body + } +); } } @@ -889,52 +928,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_Test; -internal static class TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_TestInitializer { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new InstanceHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_2Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; + await AsyncConvert.Convert(() => typedInstance.SetupWithContext(context, cancellationToken)); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_2Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_2Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; - await AsyncConvert.Convert(() => typedInstance.SetupWithContext(context, cancellationToken)); + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_Test.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_2Params_Body + } +); } } diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.DotNet8_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.DotNet8_0.verified.txt index ea0821d0d9..9540ecd25b 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.DotNet8_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.DotNet8_0.verified.txt @@ -15,49 +15,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_Class; -internal static class TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_Class { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_ClassInitializer { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.Base1), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.Base1)].Add( - new BeforeClassHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_Base1_BeforeAll1_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.Base1.BeforeAll1()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.Base1), + new BeforeClassHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), + Name = "BeforeAll1", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base1", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), - Name = "BeforeAll1", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base1", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), - Name = "Base1", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_Base1_BeforeAll1_0Params_Body, - FilePath = @"", - LineNumber = 5 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_Base1_BeforeAll1_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.Base1.BeforeAll1()); + Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), + Name = "Base1", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_Class.TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_Base1_BeforeAll1_0Params_Body, + FilePath = @"", + LineNumber = 5 + } +); } } @@ -81,49 +84,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_Test; -internal static class TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_TestInitializer { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.Base1), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.Base1)].Add( - new InstanceHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_Base1_BeforeEach1_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.Base1)instance; + await AsyncConvert.Convert(() => typedInstance.BeforeEach1()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.Base1), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base1), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), + Name = "BeforeEach1", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base1", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base1), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), - Name = "BeforeEach1", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base1", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), - Name = "Base1", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_Base1_BeforeEach1_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_Base1_BeforeEach1_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.Base1)instance; - await AsyncConvert.Convert(() => typedInstance.BeforeEach1()); + Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), + Name = "Base1", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_Test.TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_Base1_BeforeEach1_0Params_Body + } +); } } @@ -147,49 +153,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_Class; -internal static class TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_Class { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_ClassInitializer { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.Base2), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.Base2)].Add( - new BeforeClassHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_Base2_BeforeAll2_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.Base2.BeforeAll2()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.Base2), + new BeforeClassHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), + Name = "BeforeAll2", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base2", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), - Name = "BeforeAll2", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base2", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), - Name = "Base2", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_Base2_BeforeAll2_0Params_Body, - FilePath = @"", - LineNumber = 20 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_Base2_BeforeAll2_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.Base2.BeforeAll2()); + Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), + Name = "Base2", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_Class.TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_Base2_BeforeAll2_0Params_Body, + FilePath = @"", + LineNumber = 20 + } +); } } @@ -213,49 +222,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_Test; -internal static class TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_Base2_BeforeEach2_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.Base2)instance; + await AsyncConvert.Convert(() => typedInstance.BeforeEach2()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.Base2), + new InstanceHookMethod { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.Base2), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.Base2)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base2), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), + Name = "BeforeEach2", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base2", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base2), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), - Name = "BeforeEach2", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base2", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), - Name = "Base2", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_Base2_BeforeEach2_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_Base2_BeforeEach2_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.Base2)instance; - await AsyncConvert.Convert(() => typedInstance.BeforeEach2()); + Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), + Name = "Base2", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_Test.TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_Base2_BeforeEach2_0Params_Body + } +); } } @@ -279,49 +291,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_Class; -internal static class TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_Class +{ + internal static class TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_ClassInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_Base3_BeforeAll3_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.Base3.BeforeAll3()); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.Base3), + new BeforeClassHookMethod { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.Base3), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.Base3)].Add( - new BeforeClassHookMethod + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), + Name = "BeforeAll3", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base3", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), - Name = "BeforeAll3", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base3", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), - Name = "Base3", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_Base3_BeforeAll3_0Params_Body, - FilePath = @"", - LineNumber = 35 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_Base3_BeforeAll3_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.Base3.BeforeAll3()); + Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), + Name = "Base3", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_Class.TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_Base3_BeforeAll3_0Params_Body, + FilePath = @"", + LineNumber = 35 + } +); } } @@ -345,49 +360,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_Test; -internal static class TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_Test +{ + internal static class TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_Base3_BeforeEach3_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.Base3)instance; + await AsyncConvert.Convert(() => typedInstance.BeforeEach3()); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.Base3), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.Base3)].Add( - new InstanceHookMethod + static readonly int _h_TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.Base3), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base3), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), + Name = "BeforeEach3", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base3", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base3), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), - Name = "BeforeEach3", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base3", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), - Name = "Base3", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_Base3_BeforeEach3_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_Base3_BeforeEach3_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.Base3)instance; - await AsyncConvert.Convert(() => typedInstance.BeforeEach3()); + Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), + Name = "Base3", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_Test.TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_Base3_BeforeEach3_0Params_Body + } +); } } @@ -411,49 +429,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_Class; -internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_Class +{ + internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_ClassInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUp()); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new BeforeClassHookMethod + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new BeforeClassHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "BeforeAllSetUp", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "BeforeAllSetUp", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_0Params_Body, - FilePath = @"", - LineNumber = 50 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUp()); + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_Class.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_0Params_Body, + FilePath = @"", + LineNumber = 50 + } +); } } @@ -477,52 +498,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_Class; -internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_Class +{ + internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_ClassInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_1Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUpWithContext(context)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new BeforeClassHookMethod { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new BeforeClassHookMethod + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "BeforeAllSetUpWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.ClassHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.ClassHookContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.ClassHookContext) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "BeforeAllSetUpWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.ClassHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.ClassHookContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.ClassHookContext) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_1Params_Body, - FilePath = @"", - LineNumber = 56 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_1Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUpWithContext(context)); + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_Class.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_1Params_Body, + FilePath = @"", + LineNumber = 56 + } +); } } @@ -546,52 +570,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_Class; -internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_Class +{ + internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_ClassInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_1Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUp(cancellationToken)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new BeforeClassHookMethod { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new BeforeClassHookMethod + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "BeforeAllSetUp", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "BeforeAllSetUp", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_1Params_Body, - FilePath = @"", - LineNumber = 62 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_1Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUp(cancellationToken)); + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_Class.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_1Params_Body, + FilePath = @"", + LineNumber = 62 + } +); } } @@ -615,53 +642,56 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_Class; -internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_Class { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_ClassInitializer { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new BeforeClassHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_2Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUpWithContext(context, cancellationToken)); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new BeforeClassHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "BeforeAllSetUpWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.ClassHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.ClassHookContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.ClassHookContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.ClassHookContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "BeforeAllSetUpWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.ClassHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.ClassHookContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.ClassHookContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.ClassHookContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_2Params_Body, - FilePath = @"", - LineNumber = 68 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_2Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUpWithContext(context, cancellationToken)); + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_Class.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_2Params_Body, + FilePath = @"", + LineNumber = 68 + } +); } } @@ -685,49 +715,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_Test; -internal static class TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_Setup_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; + await AsyncConvert.Convert(() => typedInstance.Setup()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new InstanceHookMethod { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "Setup", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "Setup", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_Setup_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_Setup_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; - await AsyncConvert.Convert(() => typedInstance.Setup()); + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_Test.TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_Setup_0Params_Body + } +); } } @@ -751,52 +784,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_Test; -internal static class TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_Test +{ + internal static class TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_Setup_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; + await AsyncConvert.Convert(() => typedInstance.Setup(cancellationToken)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new InstanceHookMethod { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "Setup", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "Setup", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("Setup", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_Setup_1Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_Setup_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; - await AsyncConvert.Convert(() => typedInstance.Setup(cancellationToken)); + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("Setup", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_Test.TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_Setup_1Params_Body + } +); } } @@ -820,52 +856,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_Test; -internal static class TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_Test +{ + internal static class TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; + await AsyncConvert.Convert(() => typedInstance.SetupWithContext(context)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new InstanceHookMethod { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_1Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; - await AsyncConvert.Convert(() => typedInstance.SetupWithContext(context)); + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_Test.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_1Params_Body + } +); } } @@ -889,52 +928,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_Test; -internal static class TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_TestInitializer { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new InstanceHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_2Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; + await AsyncConvert.Convert(() => typedInstance.SetupWithContext(context, cancellationToken)); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_2Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_2Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; - await AsyncConvert.Convert(() => typedInstance.SetupWithContext(context, cancellationToken)); + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_Test.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_2Params_Body + } +); } } diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.DotNet9_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.DotNet9_0.verified.txt index ea0821d0d9..9540ecd25b 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.DotNet9_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.DotNet9_0.verified.txt @@ -15,49 +15,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_Class; -internal static class TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_Class { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_ClassInitializer { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.Base1), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.Base1)].Add( - new BeforeClassHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_Base1_BeforeAll1_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.Base1.BeforeAll1()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.Base1), + new BeforeClassHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), + Name = "BeforeAll1", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base1", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), - Name = "BeforeAll1", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base1", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), - Name = "Base1", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_Base1_BeforeAll1_0Params_Body, - FilePath = @"", - LineNumber = 5 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_Base1_BeforeAll1_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.Base1.BeforeAll1()); + Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), + Name = "Base1", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_Class.TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_Base1_BeforeAll1_0Params_Body, + FilePath = @"", + LineNumber = 5 + } +); } } @@ -81,49 +84,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_Test; -internal static class TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_TestInitializer { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.Base1), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.Base1)].Add( - new InstanceHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_Base1_BeforeEach1_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.Base1)instance; + await AsyncConvert.Convert(() => typedInstance.BeforeEach1()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.Base1), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base1), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), + Name = "BeforeEach1", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base1", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base1), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), - Name = "BeforeEach1", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base1", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), - Name = "Base1", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_Base1_BeforeEach1_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_Base1_BeforeEach1_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.Base1)instance; - await AsyncConvert.Convert(() => typedInstance.BeforeEach1()); + Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), + Name = "Base1", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_Test.TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_Base1_BeforeEach1_0Params_Body + } +); } } @@ -147,49 +153,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_Class; -internal static class TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_Class { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_ClassInitializer { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.Base2), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.Base2)].Add( - new BeforeClassHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_Base2_BeforeAll2_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.Base2.BeforeAll2()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.Base2), + new BeforeClassHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), + Name = "BeforeAll2", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base2", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), - Name = "BeforeAll2", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base2", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), - Name = "Base2", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_Base2_BeforeAll2_0Params_Body, - FilePath = @"", - LineNumber = 20 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_Base2_BeforeAll2_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.Base2.BeforeAll2()); + Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), + Name = "Base2", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_Class.TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_Base2_BeforeAll2_0Params_Body, + FilePath = @"", + LineNumber = 20 + } +); } } @@ -213,49 +222,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_Test; -internal static class TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_Base2_BeforeEach2_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.Base2)instance; + await AsyncConvert.Convert(() => typedInstance.BeforeEach2()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.Base2), + new InstanceHookMethod { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.Base2), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.Base2)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base2), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), + Name = "BeforeEach2", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base2", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base2), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), - Name = "BeforeEach2", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base2", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), - Name = "Base2", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_Base2_BeforeEach2_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_Base2_BeforeEach2_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.Base2)instance; - await AsyncConvert.Convert(() => typedInstance.BeforeEach2()); + Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), + Name = "Base2", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_Test.TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_Base2_BeforeEach2_0Params_Body + } +); } } @@ -279,49 +291,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_Class; -internal static class TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_Class +{ + internal static class TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_ClassInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_Base3_BeforeAll3_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.Base3.BeforeAll3()); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.Base3), + new BeforeClassHookMethod { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.Base3), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.Base3)].Add( - new BeforeClassHookMethod + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), + Name = "BeforeAll3", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base3", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), - Name = "BeforeAll3", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base3", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), - Name = "Base3", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_Base3_BeforeAll3_0Params_Body, - FilePath = @"", - LineNumber = 35 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_Base3_BeforeAll3_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.Base3.BeforeAll3()); + Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), + Name = "Base3", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_Class.TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_Base3_BeforeAll3_0Params_Body, + FilePath = @"", + LineNumber = 35 + } +); } } @@ -345,49 +360,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_Test; -internal static class TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_Test +{ + internal static class TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_Base3_BeforeEach3_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.Base3)instance; + await AsyncConvert.Convert(() => typedInstance.BeforeEach3()); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.Base3), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.Base3)].Add( - new InstanceHookMethod + static readonly int _h_TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.Base3), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base3), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), + Name = "BeforeEach3", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base3", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base3), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), - Name = "BeforeEach3", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base3", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), - Name = "Base3", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_Base3_BeforeEach3_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_Base3_BeforeEach3_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.Base3)instance; - await AsyncConvert.Convert(() => typedInstance.BeforeEach3()); + Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), + Name = "Base3", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_Test.TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_Base3_BeforeEach3_0Params_Body + } +); } } @@ -411,49 +429,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_Class; -internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_Class +{ + internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_ClassInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUp()); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new BeforeClassHookMethod + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new BeforeClassHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "BeforeAllSetUp", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "BeforeAllSetUp", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_0Params_Body, - FilePath = @"", - LineNumber = 50 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUp()); + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_Class.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_0Params_Body, + FilePath = @"", + LineNumber = 50 + } +); } } @@ -477,52 +498,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_Class; -internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_Class +{ + internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_ClassInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_1Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUpWithContext(context)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new BeforeClassHookMethod { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new BeforeClassHookMethod + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "BeforeAllSetUpWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.ClassHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.ClassHookContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.ClassHookContext) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "BeforeAllSetUpWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.ClassHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.ClassHookContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.ClassHookContext) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_1Params_Body, - FilePath = @"", - LineNumber = 56 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_1Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUpWithContext(context)); + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_Class.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_1Params_Body, + FilePath = @"", + LineNumber = 56 + } +); } } @@ -546,52 +570,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_Class; -internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_Class +{ + internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_ClassInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_1Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUp(cancellationToken)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new BeforeClassHookMethod { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new BeforeClassHookMethod + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "BeforeAllSetUp", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "BeforeAllSetUp", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_1Params_Body, - FilePath = @"", - LineNumber = 62 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_1Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUp(cancellationToken)); + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_Class.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_1Params_Body, + FilePath = @"", + LineNumber = 62 + } +); } } @@ -615,53 +642,56 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_Class; -internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_Class { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_ClassInitializer { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new BeforeClassHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_2Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUpWithContext(context, cancellationToken)); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new BeforeClassHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "BeforeAllSetUpWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.ClassHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.ClassHookContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.ClassHookContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.ClassHookContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "BeforeAllSetUpWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.ClassHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.ClassHookContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.ClassHookContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.ClassHookContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_2Params_Body, - FilePath = @"", - LineNumber = 68 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_2Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUpWithContext(context, cancellationToken)); + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_Class.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_2Params_Body, + FilePath = @"", + LineNumber = 68 + } +); } } @@ -685,49 +715,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_Test; -internal static class TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_Setup_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; + await AsyncConvert.Convert(() => typedInstance.Setup()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new InstanceHookMethod { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "Setup", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "Setup", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_Setup_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_Setup_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; - await AsyncConvert.Convert(() => typedInstance.Setup()); + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_Test.TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_Setup_0Params_Body + } +); } } @@ -751,52 +784,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_Test; -internal static class TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_Test +{ + internal static class TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_Setup_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; + await AsyncConvert.Convert(() => typedInstance.Setup(cancellationToken)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new InstanceHookMethod { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "Setup", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "Setup", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("Setup", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_Setup_1Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_Setup_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; - await AsyncConvert.Convert(() => typedInstance.Setup(cancellationToken)); + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("Setup", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_Test.TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_Setup_1Params_Body + } +); } } @@ -820,52 +856,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_Test; -internal static class TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_Test +{ + internal static class TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; + await AsyncConvert.Convert(() => typedInstance.SetupWithContext(context)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new InstanceHookMethod { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_1Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; - await AsyncConvert.Convert(() => typedInstance.SetupWithContext(context)); + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_Test.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_1Params_Body + } +); } } @@ -889,52 +928,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_Test; -internal static class TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_TestInitializer { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new InstanceHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_2Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; + await AsyncConvert.Convert(() => typedInstance.SetupWithContext(context, cancellationToken)); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_2Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_2Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; - await AsyncConvert.Convert(() => typedInstance.SetupWithContext(context, cancellationToken)); + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_Test.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_2Params_Body + } +); } } diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.Net4_7.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.Net4_7.verified.txt index f244dceaf1..179b94d842 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.Net4_7.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.Net4_7.verified.txt @@ -15,49 +15,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_Class; -internal static class TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_Class { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_ClassInitializer { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.Base1), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.Base1)].Add( - new BeforeClassHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_Base1_BeforeAll1_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.Base1.BeforeAll1()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.Base1), + new BeforeClassHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), + Name = "BeforeAll1", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base1", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), - Name = "BeforeAll1", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base1", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), - Name = "Base1", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_Base1_BeforeAll1_0Params_Body, - FilePath = @"", - LineNumber = 5 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_Base1_BeforeAll1_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.Base1.BeforeAll1()); + Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), + Name = "Base1", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_Class.TUnit_TestProject_BeforeTests_Base1_BeforeAll1_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_Base1_BeforeAll1_0Params_Body, + FilePath = @"", + LineNumber = 5 + } +); } } @@ -81,49 +84,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_Test; -internal static class TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_TestInitializer { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.Base1), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.Base1)].Add( - new InstanceHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_Base1_BeforeEach1_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.Base1)instance; + await AsyncConvert.Convert(() => typedInstance.BeforeEach1()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.Base1), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base1), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), + Name = "BeforeEach1", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base1", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base1), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), - Name = "BeforeEach1", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base1", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), - Name = "Base1", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_Base1_BeforeEach1_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_Base1_BeforeEach1_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.Base1)instance; - await AsyncConvert.Convert(() => typedInstance.BeforeEach1()); + Type = typeof(global::TUnit.TestProject.BeforeTests.Base1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base1)), + Name = "Base1", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_Test.TUnit_TestProject_BeforeTests_Base1_BeforeEach1_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_Base1_BeforeEach1_0Params_Body + } +); } } @@ -147,49 +153,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_Class; -internal static class TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_Class { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_ClassInitializer { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.Base2), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.Base2)].Add( - new BeforeClassHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_Base2_BeforeAll2_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.Base2.BeforeAll2()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.Base2), + new BeforeClassHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), + Name = "BeforeAll2", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base2", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), - Name = "BeforeAll2", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base2", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), - Name = "Base2", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_Base2_BeforeAll2_0Params_Body, - FilePath = @"", - LineNumber = 20 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_Base2_BeforeAll2_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.Base2.BeforeAll2()); + Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), + Name = "Base2", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_Class.TUnit_TestProject_BeforeTests_Base2_BeforeAll2_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_Base2_BeforeAll2_0Params_Body, + FilePath = @"", + LineNumber = 20 + } +); } } @@ -213,49 +222,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_Test; -internal static class TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_Base2_BeforeEach2_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.Base2)instance; + await AsyncConvert.Convert(() => typedInstance.BeforeEach2()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.Base2), + new InstanceHookMethod { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.Base2), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.Base2)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base2), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), + Name = "BeforeEach2", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base2", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base2), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), - Name = "BeforeEach2", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base2", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), - Name = "Base2", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_Base2_BeforeEach2_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_Base2_BeforeEach2_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.Base2)instance; - await AsyncConvert.Convert(() => typedInstance.BeforeEach2()); + Type = typeof(global::TUnit.TestProject.BeforeTests.Base2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base2)), + Name = "Base2", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_Test.TUnit_TestProject_BeforeTests_Base2_BeforeEach2_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_Base2_BeforeEach2_0Params_Body + } +); } } @@ -279,49 +291,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_Class; -internal static class TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_Class +{ + internal static class TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_ClassInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_Base3_BeforeAll3_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.Base3.BeforeAll3()); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.Base3), + new BeforeClassHookMethod { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.Base3), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.Base3)].Add( - new BeforeClassHookMethod + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), + Name = "BeforeAll3", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base3", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), - Name = "BeforeAll3", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base3", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), - Name = "Base3", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_Base3_BeforeAll3_0Params_Body, - FilePath = @"", - LineNumber = 35 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_Base3_BeforeAll3_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.Base3.BeforeAll3()); + Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), + Name = "Base3", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_Class.TUnit_TestProject_BeforeTests_Base3_BeforeAll3_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_Base3_BeforeAll3_0Params_Body, + FilePath = @"", + LineNumber = 35 + } +); } } @@ -345,49 +360,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_Test; -internal static class TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_Test +{ + internal static class TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_Base3_BeforeEach3_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.Base3)instance; + await AsyncConvert.Convert(() => typedInstance.BeforeEach3()); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.Base3), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.Base3)].Add( - new InstanceHookMethod + static readonly int _h_TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.Base3), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base3), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), + Name = "BeforeEach3", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base3", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.Base3), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), - Name = "BeforeEach3", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.Base3", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), - Name = "Base3", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_Base3_BeforeEach3_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_Base3_BeforeEach3_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.Base3)instance; - await AsyncConvert.Convert(() => typedInstance.BeforeEach3()); + Type = typeof(global::TUnit.TestProject.BeforeTests.Base3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.Base3)), + Name = "Base3", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_Test.TUnit_TestProject_BeforeTests_Base3_BeforeEach3_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_Base3_BeforeEach3_0Params_Body + } +); } } @@ -411,49 +429,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_Class; -internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_Class +{ + internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_ClassInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUp()); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new BeforeClassHookMethod + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new BeforeClassHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "BeforeAllSetUp", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "BeforeAllSetUp", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_0Params_Body, - FilePath = @"", - LineNumber = 50 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_0Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUp()); + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_Class.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_0Params_Body, + FilePath = @"", + LineNumber = 50 + } +); } } @@ -477,52 +498,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_Class; -internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_Class +{ + internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_ClassInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_1Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUpWithContext(context)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new BeforeClassHookMethod { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new BeforeClassHookMethod + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "BeforeAllSetUpWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.ClassHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.ClassHookContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.ClassHookContext) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "BeforeAllSetUpWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.ClassHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.ClassHookContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.ClassHookContext) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_1Params_Body, - FilePath = @"", - LineNumber = 56 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_1Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUpWithContext(context)); + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_Class.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_1Params_Body, + FilePath = @"", + LineNumber = 56 + } +); } } @@ -546,52 +570,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_Class; -internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_Class +{ + internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_ClassInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_1Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUp(cancellationToken)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new BeforeClassHookMethod { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new BeforeClassHookMethod + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "BeforeAllSetUp", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "BeforeAllSetUp", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_1Params_Body, - FilePath = @"", - LineNumber = 62 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_1Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUp(cancellationToken)); + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_Class.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp__CancellationToken_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUp_1Params_Body, + FilePath = @"", + LineNumber = 62 + } +); } } @@ -615,53 +642,56 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_Class; -internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_ClassInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_Class { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_ClassInitializer { - global::TUnit.Core.Sources.BeforeClassHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeClassHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new BeforeClassHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_2Params_Body(ClassHookContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUpWithContext(context, cancellationToken)); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_Class = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeClassHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new BeforeClassHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "BeforeAllSetUpWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.ClassHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.ClassHookContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.ClassHookContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.ClassHookContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "BeforeAllSetUpWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.ClassHookContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.ClassHookContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.ClassHookContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.ClassHookContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_2Params_Body, - FilePath = @"", - LineNumber = 68 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_2Params_Body(ClassHookContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.SetupTests.BeforeAllSetUpWithContext(context, cancellationToken)); + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeClassHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_Class.TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext__ClassHookContext_CancellationToken_Before_ClassInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_BeforeAllSetUpWithContext_2Params_Body, + FilePath = @"", + LineNumber = 68 + } +); } } @@ -685,49 +715,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_Test; -internal static class TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_Setup_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; + await AsyncConvert.Convert(() => typedInstance.Setup()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new InstanceHookMethod { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "Setup", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "Setup", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_Setup_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_Setup_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; - await AsyncConvert.Convert(() => typedInstance.Setup()); + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_Test.TUnit_TestProject_BeforeTests_SetupTests_Setup_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_Setup_0Params_Body + } +); } } @@ -751,52 +784,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_Test; -internal static class TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_Test +{ + internal static class TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_Setup_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; + await AsyncConvert.Convert(() => typedInstance.Setup(cancellationToken)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new InstanceHookMethod { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "Setup", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "Setup", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("Setup", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_Setup_1Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_Setup_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; - await AsyncConvert.Convert(() => typedInstance.Setup(cancellationToken)); + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("Setup", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_Test.TUnit_TestProject_BeforeTests_SetupTests_Setup__CancellationToken_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_Setup_1Params_Body + } +); } } @@ -820,52 +856,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_Test; -internal static class TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_Test +{ + internal static class TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; + await AsyncConvert.Convert(() => typedInstance.SetupWithContext(context)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new InstanceHookMethod { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_1Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; - await AsyncConvert.Convert(() => typedInstance.SetupWithContext(context)); + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_Test.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_1Params_Body + } +); } } @@ -889,52 +928,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_Test; -internal static class TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_TestInitializer { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.SetupTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.SetupTests)].Add( - new InstanceHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_2Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; + await AsyncConvert.Convert(() => typedInstance.SetupWithContext(context, cancellationToken)); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), - Name = "SetupTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_2Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_2Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.SetupTests)instance; - await AsyncConvert.Convert(() => typedInstance.SetupWithContext(context, cancellationToken)); + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.SetupTests).GetMethod("SetupWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.SetupTests", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.SetupTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.SetupTests)), + Name = "SetupTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_Test.TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext__TestContext_CancellationToken_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_SetupTests_SetupWithContext_2Params_Body + } +); } } diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet10_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet10_0.verified.txt index 65d70320f0..1de4364acd 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet10_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet10_0.verified.txt @@ -1063,9 +1063,8 @@ internal static class TUnit_TestProject_MatrixTests__TestSource { return new global::TUnit.TestProject.MatrixTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.MatrixTests), TUnit_TestProject_MatrixTests__TestSource.GetTests, TUnit_TestProject_MatrixTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_MatrixTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.MatrixTests), TUnit_TestProject_MatrixTests__TestSource.GetTests, TUnit_TestProject_MatrixTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet8_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet8_0.verified.txt index 65d70320f0..1de4364acd 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet8_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet8_0.verified.txt @@ -1063,9 +1063,8 @@ internal static class TUnit_TestProject_MatrixTests__TestSource { return new global::TUnit.TestProject.MatrixTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.MatrixTests), TUnit_TestProject_MatrixTests__TestSource.GetTests, TUnit_TestProject_MatrixTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_MatrixTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.MatrixTests), TUnit_TestProject_MatrixTests__TestSource.GetTests, TUnit_TestProject_MatrixTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet9_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet9_0.verified.txt index 65d70320f0..1de4364acd 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet9_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet9_0.verified.txt @@ -1063,9 +1063,8 @@ internal static class TUnit_TestProject_MatrixTests__TestSource { return new global::TUnit.TestProject.MatrixTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.MatrixTests), TUnit_TestProject_MatrixTests__TestSource.GetTests, TUnit_TestProject_MatrixTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_MatrixTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.MatrixTests), TUnit_TestProject_MatrixTests__TestSource.GetTests, TUnit_TestProject_MatrixTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.Net4_7.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.Net4_7.verified.txt index 3c45a99de6..096fc6dc08 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.Net4_7.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.Net4_7.verified.txt @@ -1063,9 +1063,8 @@ internal static class TUnit_TestProject_MatrixTests__TestSource { return new global::TUnit.TestProject.MatrixTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.MatrixTests), TUnit_TestProject_MatrixTests__TestSource.GetTests, TUnit_TestProject_MatrixTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_MatrixTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.MatrixTests), TUnit_TestProject_MatrixTests__TestSource.GetTests, TUnit_TestProject_MatrixTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.DotNet10_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.DotNet10_0.verified.txt index 63ab513bbd..f03011c053 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.DotNet10_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.DotNet10_0.verified.txt @@ -864,9 +864,8 @@ internal static class TUnit_TestProject_MethodDataSourceDrivenTests__TestSource { return new global::TUnit.TestProject.MethodDataSourceDrivenTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.MethodDataSourceDrivenTests), TUnit_TestProject_MethodDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_MethodDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_MethodDataSourceDrivenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.MethodDataSourceDrivenTests), TUnit_TestProject_MethodDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_MethodDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.DotNet8_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.DotNet8_0.verified.txt index 63ab513bbd..f03011c053 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.DotNet8_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.DotNet8_0.verified.txt @@ -864,9 +864,8 @@ internal static class TUnit_TestProject_MethodDataSourceDrivenTests__TestSource { return new global::TUnit.TestProject.MethodDataSourceDrivenTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.MethodDataSourceDrivenTests), TUnit_TestProject_MethodDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_MethodDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_MethodDataSourceDrivenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.MethodDataSourceDrivenTests), TUnit_TestProject_MethodDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_MethodDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.DotNet9_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.DotNet9_0.verified.txt index 63ab513bbd..f03011c053 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.DotNet9_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.DotNet9_0.verified.txt @@ -864,9 +864,8 @@ internal static class TUnit_TestProject_MethodDataSourceDrivenTests__TestSource { return new global::TUnit.TestProject.MethodDataSourceDrivenTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.MethodDataSourceDrivenTests), TUnit_TestProject_MethodDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_MethodDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_MethodDataSourceDrivenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.MethodDataSourceDrivenTests), TUnit_TestProject_MethodDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_MethodDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.Net4_7.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.Net4_7.verified.txt index db451c9fb2..8b2cf6fbd0 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.Net4_7.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.Net4_7.verified.txt @@ -864,9 +864,8 @@ internal static class TUnit_TestProject_MethodDataSourceDrivenTests__TestSource { return new global::TUnit.TestProject.MethodDataSourceDrivenTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.MethodDataSourceDrivenTests), TUnit_TestProject_MethodDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_MethodDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_MethodDataSourceDrivenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.MethodDataSourceDrivenTests), TUnit_TestProject_MethodDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_MethodDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.DotNet10_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.DotNet10_0.verified.txt index 64e7c3e83d..046b1445d0 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.DotNet10_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.DotNet10_0.verified.txt @@ -141,9 +141,8 @@ internal static class TUnit_TestProject_TupleDataSourceDrivenTests__TestSource { return new global::TUnit.TestProject.TupleDataSourceDrivenTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.TupleDataSourceDrivenTests), TUnit_TestProject_TupleDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_TupleDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_TupleDataSourceDrivenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.TupleDataSourceDrivenTests), TUnit_TestProject_TupleDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_TupleDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.DotNet8_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.DotNet8_0.verified.txt index 64e7c3e83d..046b1445d0 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.DotNet8_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.DotNet8_0.verified.txt @@ -141,9 +141,8 @@ internal static class TUnit_TestProject_TupleDataSourceDrivenTests__TestSource { return new global::TUnit.TestProject.TupleDataSourceDrivenTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.TupleDataSourceDrivenTests), TUnit_TestProject_TupleDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_TupleDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_TupleDataSourceDrivenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.TupleDataSourceDrivenTests), TUnit_TestProject_TupleDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_TupleDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.DotNet9_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.DotNet9_0.verified.txt index 64e7c3e83d..046b1445d0 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.DotNet9_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.DotNet9_0.verified.txt @@ -141,9 +141,8 @@ internal static class TUnit_TestProject_TupleDataSourceDrivenTests__TestSource { return new global::TUnit.TestProject.TupleDataSourceDrivenTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.TupleDataSourceDrivenTests), TUnit_TestProject_TupleDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_TupleDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_TupleDataSourceDrivenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.TupleDataSourceDrivenTests), TUnit_TestProject_TupleDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_TupleDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.Net4_7.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.Net4_7.verified.txt index 30f03aea00..86a905b6ea 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.Net4_7.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.Net4_7.verified.txt @@ -141,9 +141,8 @@ internal static class TUnit_TestProject_TupleDataSourceDrivenTests__TestSource { return new global::TUnit.TestProject.TupleDataSourceDrivenTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.TupleDataSourceDrivenTests), TUnit_TestProject_TupleDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_TupleDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_TupleDataSourceDrivenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.TupleDataSourceDrivenTests), TUnit_TestProject_TupleDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_TupleDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ConstantArgumentsTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConstantArgumentsTests.Test.verified.txt index c79fae8609..4ca0b62d6b 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConstantArgumentsTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConstantArgumentsTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -570,9 +570,8 @@ internal static class TUnit_TestProject_ConstantArgumentsTests__TestSource { return new global::TUnit.TestProject.ConstantArgumentsTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.ConstantArgumentsTests), TUnit_TestProject_ConstantArgumentsTests__TestSource.GetTests, TUnit_TestProject_ConstantArgumentsTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_ConstantArgumentsTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.ConstantArgumentsTests), TUnit_TestProject_ConstantArgumentsTests__TestSource.GetTests, TUnit_TestProject_ConstantArgumentsTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ConstantInBaseClassTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConstantInBaseClassTests.Test.verified.txt index f30010e5a0..d1e2ebbc5e 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConstantInBaseClassTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConstantInBaseClassTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -114,9 +114,8 @@ internal static class TUnit_TestProject_Bugs__1432_ConstantInBaseClassTests__Tes { return new global::TUnit.TestProject.Bugs._1432.ConstantInBaseClassTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1432.ConstantInBaseClassTests), TUnit_TestProject_Bugs__1432_ConstantInBaseClassTests__TestSource.GetTests, TUnit_TestProject_Bugs__1432_ConstantInBaseClassTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_Bugs__1432_ConstantInBaseClassTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1432.ConstantInBaseClassTests), TUnit_TestProject_Bugs__1432_ConstantInBaseClassTests__TestSource.GetTests, TUnit_TestProject_Bugs__1432_ConstantInBaseClassTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ConstantsInInterpolatedStringsTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConstantsInInterpolatedStringsTests.Test.verified.txt index c47355ba28..2758d117e7 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConstantsInInterpolatedStringsTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConstantsInInterpolatedStringsTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -114,9 +114,8 @@ internal static class TUnit_TestProject_Bugs__1432_ConstantsInInterpolatedString { return new global::TUnit.TestProject.Bugs._1432.ConstantsInInterpolatedStringsTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1432.ConstantsInInterpolatedStringsTests), TUnit_TestProject_Bugs__1432_ConstantsInInterpolatedStringsTests__TestSource.GetTests, TUnit_TestProject_Bugs__1432_ConstantsInInterpolatedStringsTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_Bugs__1432_ConstantsInInterpolatedStringsTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1432.ConstantsInInterpolatedStringsTests), TUnit_TestProject_Bugs__1432_ConstantsInInterpolatedStringsTests__TestSource.GetTests, TUnit_TestProject_Bugs__1432_ConstantsInInterpolatedStringsTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/CustomDisplayNameTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/CustomDisplayNameTests.Test.verified.txt index 0e36364ba1..a4af657101 100644 --- a/TUnit.Core.SourceGenerator.Tests/CustomDisplayNameTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/CustomDisplayNameTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -830,9 +830,8 @@ internal static class TUnit_TestProject_CustomDisplayNameTests__TestSource { return new global::TUnit.TestProject.CustomDisplayNameTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.CustomDisplayNameTests), TUnit_TestProject_CustomDisplayNameTests__TestSource.GetTests, TUnit_TestProject_CustomDisplayNameTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_CustomDisplayNameTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.CustomDisplayNameTests), TUnit_TestProject_CustomDisplayNameTests__TestSource.GetTests, TUnit_TestProject_CustomDisplayNameTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/DataDrivenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/DataDrivenTests.Test.verified.txt index 91ebc6d8b6..7e2f85dd6a 100644 --- a/TUnit.Core.SourceGenerator.Tests/DataDrivenTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/DataDrivenTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -826,9 +826,8 @@ internal static class TUnit_TestProject_DataDrivenTests__TestSource { return new global::TUnit.TestProject.DataDrivenTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.DataDrivenTests), TUnit_TestProject_DataDrivenTests__TestSource.GetTests, TUnit_TestProject_DataDrivenTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_DataDrivenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.DataDrivenTests), TUnit_TestProject_DataDrivenTests__TestSource.GetTests, TUnit_TestProject_DataDrivenTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/DataSourceClassCombinedWithDataSourceMethodTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/DataSourceClassCombinedWithDataSourceMethodTests.Test.verified.txt index 066dc300a1..33bcf59f68 100644 --- a/TUnit.Core.SourceGenerator.Tests/DataSourceClassCombinedWithDataSourceMethodTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/DataSourceClassCombinedWithDataSourceMethodTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -272,9 +272,8 @@ internal static class TUnit_TestProject_DataSourceClassCombinedWithDataSourceMet { return new global::TUnit.TestProject.DataSourceClassCombinedWithDataSourceMethod(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.DataSourceClassCombinedWithDataSourceMethod), TUnit_TestProject_DataSourceClassCombinedWithDataSourceMethod__TestSource.GetTests, TUnit_TestProject_DataSourceClassCombinedWithDataSourceMethod__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_DataSourceClassCombinedWithDataSourceMethod__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.DataSourceClassCombinedWithDataSourceMethod), TUnit_TestProject_DataSourceClassCombinedWithDataSourceMethod__TestSource.GetTests, TUnit_TestProject_DataSourceClassCombinedWithDataSourceMethod__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/DataSourceGeneratorTests.Typed.verified.txt b/TUnit.Core.SourceGenerator.Tests/DataSourceGeneratorTests.Typed.verified.txt index d876a36b36..f0f22ca78a 100644 --- a/TUnit.Core.SourceGenerator.Tests/DataSourceGeneratorTests.Typed.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/DataSourceGeneratorTests.Typed.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -329,9 +329,8 @@ internal static class TUnit_TestProject_DataSourceGeneratorTests__TestSource { return new global::TUnit.TestProject.DataSourceGeneratorTests(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2])); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.DataSourceGeneratorTests), TUnit_TestProject_DataSourceGeneratorTests__TestSource.GetTests, TUnit_TestProject_DataSourceGeneratorTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_DataSourceGeneratorTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.DataSourceGeneratorTests), TUnit_TestProject_DataSourceGeneratorTests__TestSource.GetTests, TUnit_TestProject_DataSourceGeneratorTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/DataSourceGeneratorTests.Untyped.verified.txt b/TUnit.Core.SourceGenerator.Tests/DataSourceGeneratorTests.Untyped.verified.txt index 27528b74d6..0be38f81c6 100644 --- a/TUnit.Core.SourceGenerator.Tests/DataSourceGeneratorTests.Untyped.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/DataSourceGeneratorTests.Untyped.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -119,9 +119,8 @@ internal static class TUnit_TestProject_AutoDataTests__TestSource { return new global::TUnit.TestProject.AutoDataTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.AutoDataTests), TUnit_TestProject_AutoDataTests__TestSource.GetTests, TUnit_TestProject_AutoDataTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_AutoDataTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.AutoDataTests), TUnit_TestProject_AutoDataTests__TestSource.GetTests, TUnit_TestProject_AutoDataTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/DecimalArgumentTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/DecimalArgumentTests.Test.verified.txt index c9b631d910..fd0c661749 100644 --- a/TUnit.Core.SourceGenerator.Tests/DecimalArgumentTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/DecimalArgumentTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -980,9 +980,8 @@ internal static class TUnit_TestProject_DecimalArgumentTests__TestSource { return new global::TUnit.TestProject.DecimalArgumentTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.DecimalArgumentTests), TUnit_TestProject_DecimalArgumentTests__TestSource.GetTests, TUnit_TestProject_DecimalArgumentTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_DecimalArgumentTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.DecimalArgumentTests), TUnit_TestProject_DecimalArgumentTests__TestSource.GetTests, TUnit_TestProject_DecimalArgumentTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet10_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet10_0.verified.txt index 886335f4bc..541c2796f2 100644 --- a/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet10_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet10_0.verified.txt @@ -200,9 +200,8 @@ internal static class TUnit_TestProject_BasicTests__TestSource { return new global::TUnit.TestProject.BasicTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_BasicTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet8_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet8_0.verified.txt index 886335f4bc..541c2796f2 100644 --- a/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet8_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet8_0.verified.txt @@ -200,9 +200,8 @@ internal static class TUnit_TestProject_BasicTests__TestSource { return new global::TUnit.TestProject.BasicTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_BasicTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet9_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet9_0.verified.txt index 886335f4bc..541c2796f2 100644 --- a/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet9_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet9_0.verified.txt @@ -200,9 +200,8 @@ internal static class TUnit_TestProject_BasicTests__TestSource { return new global::TUnit.TestProject.BasicTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_BasicTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.Net4_7.verified.txt b/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.Net4_7.verified.txt index 3df345393b..a791373b8c 100644 --- a/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.Net4_7.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.Net4_7.verified.txt @@ -200,9 +200,8 @@ internal static class TUnit_TestProject_BasicTests__TestSource { return new global::TUnit.TestProject.BasicTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_BasicTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.BasicTests), TUnit_TestProject_BasicTests__TestSource.GetTests, TUnit_TestProject_BasicTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet10_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet10_0.verified.txt index 5b0de5e9e2..e0a05c3d5f 100644 --- a/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet10_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet10_0.verified.txt @@ -99,6 +99,8 @@ file static class TUnitInfrastructure } catch { /* TUnit.Core not available - skip logging */ } } + global::System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(typeof(global::TUnit.Generated.TUnit_TestRegistration).TypeHandle); + global::System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(typeof(global::TUnit.Generated.TUnit_HookRegistration).TypeHandle); try { global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogDebug("[ModuleInitializer:TestsBase`1] TUnit infrastructure initialized"); @@ -106,3 +108,10 @@ file static class TUnitInfrastructure catch { /* TUnit.Core not available - skip logging */ } } } +namespace TUnit.Generated +{ + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] + internal static partial class TUnit_TestRegistration { } + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] + internal static partial class TUnit_HookRegistration { } +} diff --git a/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet8_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet8_0.verified.txt index 5b0de5e9e2..e0a05c3d5f 100644 --- a/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet8_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet8_0.verified.txt @@ -99,6 +99,8 @@ file static class TUnitInfrastructure } catch { /* TUnit.Core not available - skip logging */ } } + global::System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(typeof(global::TUnit.Generated.TUnit_TestRegistration).TypeHandle); + global::System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(typeof(global::TUnit.Generated.TUnit_HookRegistration).TypeHandle); try { global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogDebug("[ModuleInitializer:TestsBase`1] TUnit infrastructure initialized"); @@ -106,3 +108,10 @@ file static class TUnitInfrastructure catch { /* TUnit.Core not available - skip logging */ } } } +namespace TUnit.Generated +{ + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] + internal static partial class TUnit_TestRegistration { } + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] + internal static partial class TUnit_HookRegistration { } +} diff --git a/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet9_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet9_0.verified.txt index 5b0de5e9e2..e0a05c3d5f 100644 --- a/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet9_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet9_0.verified.txt @@ -99,6 +99,8 @@ file static class TUnitInfrastructure } catch { /* TUnit.Core not available - skip logging */ } } + global::System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(typeof(global::TUnit.Generated.TUnit_TestRegistration).TypeHandle); + global::System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(typeof(global::TUnit.Generated.TUnit_HookRegistration).TypeHandle); try { global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogDebug("[ModuleInitializer:TestsBase`1] TUnit infrastructure initialized"); @@ -106,3 +108,10 @@ file static class TUnitInfrastructure catch { /* TUnit.Core not available - skip logging */ } } } +namespace TUnit.Generated +{ + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] + internal static partial class TUnit_TestRegistration { } + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] + internal static partial class TUnit_HookRegistration { } +} diff --git a/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.Net4_7.verified.txt b/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.Net4_7.verified.txt index a823905ace..e03a68e441 100644 --- a/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.Net4_7.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.Net4_7.verified.txt @@ -99,6 +99,8 @@ file static class TUnitInfrastructure } catch { /* TUnit.Core not available - skip logging */ } } + global::System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(typeof(global::TUnit.Generated.TUnit_TestRegistration).TypeHandle); + global::System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(typeof(global::TUnit.Generated.TUnit_HookRegistration).TypeHandle); try { global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogDebug("[ModuleInitializer:TestsBase`1] TUnit infrastructure initialized"); @@ -106,3 +108,10 @@ file static class TUnitInfrastructure catch { /* TUnit.Core not available - skip logging */ } } } +namespace TUnit.Generated +{ + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] + internal static partial class TUnit_TestRegistration { } + [global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute] + internal static partial class TUnit_HookRegistration { } +} diff --git a/TUnit.Core.SourceGenerator.Tests/EnumMemberNamesTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/EnumMemberNamesTests.Test.verified.txt index 6f8d822c25..df78ad1797 100644 --- a/TUnit.Core.SourceGenerator.Tests/EnumMemberNamesTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/EnumMemberNamesTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -119,9 +119,8 @@ internal static class TUnit_TestProject_Bugs__1432_EnumMemberNamesTests__TestSou { return new global::TUnit.TestProject.Bugs._1432.EnumMemberNamesTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1432.EnumMemberNamesTests), TUnit_TestProject_Bugs__1432_EnumMemberNamesTests__TestSource.GetTests, TUnit_TestProject_Bugs__1432_EnumMemberNamesTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_Bugs__1432_EnumMemberNamesTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1432.EnumMemberNamesTests), TUnit_TestProject_Bugs__1432_EnumMemberNamesTests__TestSource.GetTests, TUnit_TestProject_Bugs__1432_EnumMemberNamesTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/EnumerableDataSourceDrivenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/EnumerableDataSourceDrivenTests.Test.verified.txt index 78f26c382c..873dc4b5a1 100644 --- a/TUnit.Core.SourceGenerator.Tests/EnumerableDataSourceDrivenTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/EnumerableDataSourceDrivenTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -393,9 +393,8 @@ internal static class TUnit_TestProject_EnumerableDataSourceDrivenTests__TestSou { return new global::TUnit.TestProject.EnumerableDataSourceDrivenTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.EnumerableDataSourceDrivenTests), TUnit_TestProject_EnumerableDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_EnumerableDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_EnumerableDataSourceDrivenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.EnumerableDataSourceDrivenTests), TUnit_TestProject_EnumerableDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_EnumerableDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/EnumerableTupleDataSourceDrivenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/EnumerableTupleDataSourceDrivenTests.Test.verified.txt index c2772e68c4..d3ce688b1c 100644 --- a/TUnit.Core.SourceGenerator.Tests/EnumerableTupleDataSourceDrivenTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/EnumerableTupleDataSourceDrivenTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -205,9 +205,8 @@ internal static class TUnit_TestProject_EnumerableTupleDataSourceDrivenTests__Te { return new global::TUnit.TestProject.EnumerableTupleDataSourceDrivenTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.EnumerableTupleDataSourceDrivenTests), TUnit_TestProject_EnumerableTupleDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_EnumerableTupleDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_EnumerableTupleDataSourceDrivenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.EnumerableTupleDataSourceDrivenTests), TUnit_TestProject_EnumerableTupleDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_EnumerableTupleDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/ExpectedArgumentTypeTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ExpectedArgumentTypeTests.Test.verified.txt index 3caf7eb277..1ad4fde735 100644 --- a/TUnit.Core.SourceGenerator.Tests/ExpectedArgumentTypeTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ExpectedArgumentTypeTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -234,9 +234,8 @@ internal static class TUnit_TestProject_ExpectedArgumentTypeTests__TestSource { return new global::TUnit.TestProject.ExpectedArgumentTypeTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.ExpectedArgumentTypeTests), TUnit_TestProject_ExpectedArgumentTypeTests__TestSource.GetTests, TUnit_TestProject_ExpectedArgumentTypeTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_ExpectedArgumentTypeTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.ExpectedArgumentTypeTests), TUnit_TestProject_ExpectedArgumentTypeTests__TestSource.GetTests, TUnit_TestProject_ExpectedArgumentTypeTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/GenericMethodTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/GenericMethodTests.Test.verified.txt index 3fb0dbc31b..3282c7e988 100644 --- a/TUnit.Core.SourceGenerator.Tests/GenericMethodTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/GenericMethodTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -321,11 +321,7 @@ internal sealed class TUnit_TestProject_GenericMethodTests_AggregateBy_HasExpect }; } } -internal static class TUnit_TestProject_GenericMethodTests_AggregateBy_HasExpectedOutput__IEnumerable_TSourc_06BD488B_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.GenericMethodTests), new TUnit_TestProject_GenericMethodTests_AggregateBy_HasExpectedOutput__IEnumerable_TSourc_06BD488B_TestSource()); - } + static readonly int _r_TUnit_TestProject_GenericMethodTests_AggregateBy_HasExpectedOutput__IEnumerable_TSourc_06BD488B_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.GenericMethodTests), new TUnit_TestProject_GenericMethodTests_AggregateBy_HasExpectedOutput__IEnumerable_TSourc_06BD488B_TestSource()); } diff --git a/TUnit.Core.SourceGenerator.Tests/GenericMethodWithDataSourceTests.Generic_Method_With_MethodDataSource_Should_Generate_Tests.verified.txt b/TUnit.Core.SourceGenerator.Tests/GenericMethodWithDataSourceTests.Generic_Method_With_MethodDataSource_Should_Generate_Tests.verified.txt index bf1a36e8f0..dadfa9c589 100644 --- a/TUnit.Core.SourceGenerator.Tests/GenericMethodWithDataSourceTests.Generic_Method_With_MethodDataSource_Should_Generate_Tests.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/GenericMethodWithDataSourceTests.Generic_Method_With_MethodDataSource_Should_Generate_Tests.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -211,13 +211,9 @@ internal sealed class TUnit_TestProject_Bugs__4431_GenericClassNoDataSource_T_Sh }; } } -internal static class TUnit_TestProject_Bugs__4431_GenericClassNoDataSource_T_Should_Create_Instance_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._4431.GenericClassNoDataSource<>), new TUnit_TestProject_Bugs__4431_GenericClassNoDataSource_T_Should_Create_Instance_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__4431_GenericClassNoDataSource_T_Should_Create_Instance_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._4431.GenericClassNoDataSource<>), new TUnit_TestProject_Bugs__4431_GenericClassNoDataSource_T_Should_Create_Instance_TestSource()); } @@ -495,13 +491,9 @@ internal sealed class TUnit_TestProject_Bugs__4431_GenericClassWithMethodDataSou }; } } -internal static class TUnit_TestProject_Bugs__4431_GenericClassWithMethodDataSource_T_Should_Have_Number__int_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._4431.GenericClassWithMethodDataSource<>), new TUnit_TestProject_Bugs__4431_GenericClassWithMethodDataSource_T_Should_Have_Number__int_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__4431_GenericClassWithMethodDataSource_T_Should_Have_Number__int_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._4431.GenericClassWithMethodDataSource<>), new TUnit_TestProject_Bugs__4431_GenericClassWithMethodDataSource_T_Should_Have_Number__int_TestSource()); } @@ -782,13 +774,9 @@ internal sealed class TUnit_TestProject_Bugs__4431_NonGenericClassWithGenericMet }; } } -internal static class TUnit_TestProject_Bugs__4431_NonGenericClassWithGenericMethod_GenericMethod_Should_Work_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._4431.NonGenericClassWithGenericMethod), new TUnit_TestProject_Bugs__4431_NonGenericClassWithGenericMethod_GenericMethod_Should_Work_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__4431_NonGenericClassWithGenericMethod_GenericMethod_Should_Work_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._4431.NonGenericClassWithGenericMethod), new TUnit_TestProject_Bugs__4431_NonGenericClassWithGenericMethod_GenericMethod_Should_Work_TestSource()); } @@ -1062,13 +1050,9 @@ internal sealed class TUnit_TestProject_Bugs__4431_NonGenericClassWithGenericMet }; } } -internal static class TUnit_TestProject_Bugs__4431_NonGenericClassWithGenericMethodAndDataSource_GenericMeth_0AB5EDCD_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._4431.NonGenericClassWithGenericMethodAndDataSource), new TUnit_TestProject_Bugs__4431_NonGenericClassWithGenericMethodAndDataSource_GenericMeth_0AB5EDCD_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__4431_NonGenericClassWithGenericMethodAndDataSource_GenericMeth_0AB5EDCD_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._4431.NonGenericClassWithGenericMethodAndDataSource), new TUnit_TestProject_Bugs__4431_NonGenericClassWithGenericMethodAndDataSource_GenericMeth_0AB5EDCD_TestSource()); } @@ -1423,13 +1407,9 @@ internal sealed class TUnit_TestProject_Bugs__4431_GenericClassWithGenericMethod }; } } -internal static class TUnit_TestProject_Bugs__4431_GenericClassWithGenericMethod_TClass_BothGeneric_Should_Work_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._4431.GenericClassWithGenericMethod<>), new TUnit_TestProject_Bugs__4431_GenericClassWithGenericMethod_TClass_BothGeneric_Should_Work_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__4431_GenericClassWithGenericMethod_TClass_BothGeneric_Should_Work_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._4431.GenericClassWithGenericMethod<>), new TUnit_TestProject_Bugs__4431_GenericClassWithGenericMethod_TClass_BothGeneric_Should_Work_TestSource()); } @@ -1648,13 +1628,9 @@ internal sealed class TUnit_TestProject_Bugs__4431_GenericClassWithConstructor_T }; } } -internal static class TUnit_TestProject_Bugs__4431_GenericClassWithConstructor_T_Should_Have_Label_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._4431.GenericClassWithConstructor<>), new TUnit_TestProject_Bugs__4431_GenericClassWithConstructor_T_Should_Have_Label_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__4431_GenericClassWithConstructor_T_Should_Have_Label_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._4431.GenericClassWithConstructor<>), new TUnit_TestProject_Bugs__4431_GenericClassWithConstructor_T_Should_Have_Label_TestSource()); } @@ -1873,13 +1849,9 @@ internal sealed class TUnit_TestProject_Bugs__4431_MultipleTypeParameters_T1_T2_ }; } } -internal static class TUnit_TestProject_Bugs__4431_MultipleTypeParameters_T1_T2_Should_Handle_Multiple_Type__8C0B02C5_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._4431.MultipleTypeParameters<,>), new TUnit_TestProject_Bugs__4431_MultipleTypeParameters_T1_T2_Should_Handle_Multiple_Type__8C0B02C5_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__4431_MultipleTypeParameters_T1_T2_Should_Handle_Multiple_Type__8C0B02C5_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._4431.MultipleTypeParameters<,>), new TUnit_TestProject_Bugs__4431_MultipleTypeParameters_T1_T2_Should_Handle_Multiple_Type__8C0B02C5_TestSource()); } @@ -2098,13 +2070,9 @@ internal sealed class TUnit_TestProject_Bugs__4431_DerivedGenericClass_T_Should_ }; } } -internal static class TUnit_TestProject_Bugs__4431_DerivedGenericClass_T_Should_Create_From_Base_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._4431.DerivedGenericClass<>), new TUnit_TestProject_Bugs__4431_DerivedGenericClass_T_Should_Create_From_Base_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__4431_DerivedGenericClass_T_Should_Create_From_Base_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._4431.DerivedGenericClass<>), new TUnit_TestProject_Bugs__4431_DerivedGenericClass_T_Should_Create_From_Base_TestSource()); } @@ -2440,13 +2408,9 @@ internal sealed class TUnit_TestProject_Bugs__4431_GenericClassWithClassDataSour }; } } -internal static class TUnit_TestProject_Bugs__4431_GenericClassWithClassDataSource_T_Should_Have_DataSource_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._4431.GenericClassWithClassDataSource<>), new TUnit_TestProject_Bugs__4431_GenericClassWithClassDataSource_T_Should_Have_DataSource_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__4431_GenericClassWithClassDataSource_T_Should_Have_DataSource_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._4431.GenericClassWithClassDataSource<>), new TUnit_TestProject_Bugs__4431_GenericClassWithClassDataSource_T_Should_Have_DataSource_TestSource()); } @@ -3111,11 +3075,7 @@ internal sealed class TUnit_TestProject_Bugs__4431_GenericClassGenericMethodWith }; } } -internal static class TUnit_TestProject_Bugs__4431_GenericClassGenericMethodWithDataSources_TClass_FullyGene_0A3B401E_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._4431.GenericClassGenericMethodWithDataSources<>), new TUnit_TestProject_Bugs__4431_GenericClassGenericMethodWithDataSources_TClass_FullyGene_0A3B401E_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__4431_GenericClassGenericMethodWithDataSources_TClass_FullyGene_0A3B401E_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._4431.GenericClassGenericMethodWithDataSources<>), new TUnit_TestProject_Bugs__4431_GenericClassGenericMethodWithDataSources_TClass_FullyGene_0A3B401E_TestSource()); } diff --git a/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_EmptyGenericRegistry_WhenNoGenericsFound.verified.txt b/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_EmptyGenericRegistry_WhenNoGenericsFound.verified.txt index c5642cab45..5f63744743 100644 --- a/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_EmptyGenericRegistry_WhenNoGenericsFound.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_EmptyGenericRegistry_WhenNoGenericsFound.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -92,9 +92,8 @@ internal static class TUnit_TestProject_SimpleTestClass__TestSource { return new global::TUnit.TestProject.SimpleTestClass(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.SimpleTestClass), TUnit_TestProject_SimpleTestClass__TestSource.GetTests, TUnit_TestProject_SimpleTestClass__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_SimpleTestClass__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.SimpleTestClass), TUnit_TestProject_SimpleTestClass__TestSource.GetTests, TUnit_TestProject_SimpleTestClass__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_GenericConstraints_WithInstantiation.verified.txt b/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_GenericConstraints_WithInstantiation.verified.txt index 21436bf844..ca8388a672 100644 --- a/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_GenericConstraints_WithInstantiation.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_GenericConstraints_WithInstantiation.verified.txt @@ -208,11 +208,7 @@ internal sealed class TUnit_TestProject_ConstrainedGenericTestClass_T_TestMethod }; } } -internal static class TUnit_TestProject_ConstrainedGenericTestClass_T_TestMethod_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.ConstrainedGenericTestClass<>), new TUnit_TestProject_ConstrainedGenericTestClass_T_TestMethod_TestSource()); - } + static readonly int _r_TUnit_TestProject_ConstrainedGenericTestClass_T_TestMethod_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.ConstrainedGenericTestClass<>), new TUnit_TestProject_ConstrainedGenericTestClass_T_TestMethod_TestSource()); } diff --git a/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_GenericTestClass_WithExplicitInstantiation.verified.txt b/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_GenericTestClass_WithExplicitInstantiation.verified.txt index da34c4f1a8..c35465369a 100644 --- a/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_GenericTestClass_WithExplicitInstantiation.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_GenericTestClass_WithExplicitInstantiation.verified.txt @@ -208,11 +208,7 @@ internal sealed class TUnit_TestProject_GenericTestClass_T_TestMethod_TestSource }; } } -internal static class TUnit_TestProject_GenericTestClass_T_TestMethod_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.GenericTestClass<>), new TUnit_TestProject_GenericTestClass_T_TestMethod_TestSource()); - } + static readonly int _r_TUnit_TestProject_GenericTestClass_T_TestMethod_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.GenericTestClass<>), new TUnit_TestProject_GenericTestClass_T_TestMethod_TestSource()); } diff --git a/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_GenericTestMethod_WithExplicitInstantiation.verified.txt b/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_GenericTestMethod_WithExplicitInstantiation.verified.txt index 7cb6e27314..a0f3d9fbe4 100644 --- a/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_GenericTestMethod_WithExplicitInstantiation.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_GenericTestMethod_WithExplicitInstantiation.verified.txt @@ -204,11 +204,7 @@ internal sealed class TUnit_TestProject_TestClass_GenericTestMethod_TestSource : }; } } -internal static class TUnit_TestProject_TestClass_GenericTestMethod_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.TestClass), new TUnit_TestProject_TestClass_GenericTestMethod_TestSource()); - } + static readonly int _r_TUnit_TestProject_TestClass_GenericTestMethod_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.TestClass), new TUnit_TestProject_TestClass_GenericTestMethod_TestSource()); } diff --git a/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_MultipleGenericParameters.verified.txt b/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_MultipleGenericParameters.verified.txt index bfd48af3ec..278513d57a 100644 --- a/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_MultipleGenericParameters.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_MultipleGenericParameters.verified.txt @@ -208,11 +208,7 @@ internal sealed class TUnit_TestProject_MultiGenericTestClass_T1_T2_TestMethod_T }; } } -internal static class TUnit_TestProject_MultiGenericTestClass_T1_T2_TestMethod_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.MultiGenericTestClass<,>), new TUnit_TestProject_MultiGenericTestClass_T1_T2_TestMethod_TestSource()); - } + static readonly int _r_TUnit_TestProject_MultiGenericTestClass_T1_T2_TestMethod_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.MultiGenericTestClass<,>), new TUnit_TestProject_MultiGenericTestClass_T1_T2_TestMethod_TestSource()); } diff --git a/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_NestedGenericTypes.verified.txt b/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_NestedGenericTypes.verified.txt index 7bd177afb7..208c388363 100644 --- a/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_NestedGenericTypes.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_NestedGenericTypes.verified.txt @@ -208,11 +208,7 @@ internal sealed class TUnit_TestProject_NestedGenericTestClass_T_TestMethod_Test }; } } -internal static class TUnit_TestProject_NestedGenericTestClass_T_TestMethod_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.NestedGenericTestClass<>), new TUnit_TestProject_NestedGenericTestClass_T_TestMethod_TestSource()); - } + static readonly int _r_TUnit_TestProject_NestedGenericTestClass_T_TestMethod_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.NestedGenericTestClass<>), new TUnit_TestProject_NestedGenericTestClass_T_TestMethod_TestSource()); } diff --git a/TUnit.Core.SourceGenerator.Tests/GlobalStaticAfterEachTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/GlobalStaticAfterEachTests.Test.verified.txt index 3881dec099..d4816a6c89 100644 --- a/TUnit.Core.SourceGenerator.Tests/GlobalStaticAfterEachTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/GlobalStaticAfterEachTests.Test.verified.txt @@ -15,49 +15,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalBase1_AfterEach1_After_Test; -internal static class TUnit_TestProject_AfterTests_GlobalBase1_AfterEach1_After_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalBase1_AfterEach1_After_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_AfterTests_GlobalBase1_AfterEach1_After_TestInitializer { - global::TUnit.Core.Sources.AfterTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.AfterTests.GlobalBase1), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.AfterTestHooks[typeof(global::TUnit.TestProject.AfterTests.GlobalBase1)].Add( - new InstanceHookMethod + internal static async ValueTask global_TUnit_TestProject_AfterTests_GlobalBase1_AfterEach1_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.AfterTests.GlobalBase1)instance; + await AsyncConvert.Convert(() => typedInstance.AfterEach1()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_AfterTests_GlobalBase1_AfterEach1_After_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterTestHooks, typeof(global::TUnit.TestProject.AfterTests.GlobalBase1), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.AfterTests.GlobalBase1), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalBase1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalBase1)), + Name = "AfterEach1", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalBase1", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.AfterTests.GlobalBase1), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalBase1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalBase1)), - Name = "AfterEach1", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalBase1", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalBase1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalBase1)), - Name = "GlobalBase1", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), - Body = global_TUnit_TestProject_AfterTests_GlobalBase1_AfterEach1_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_GlobalBase1_AfterEach1_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.AfterTests.GlobalBase1)instance; - await AsyncConvert.Convert(() => typedInstance.AfterEach1()); + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalBase1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalBase1)), + Name = "GlobalBase1", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalBase1_AfterEach1_After_Test.TUnit_TestProject_AfterTests_GlobalBase1_AfterEach1_After_TestInitializer.global_TUnit_TestProject_AfterTests_GlobalBase1_AfterEach1_0Params_Body + } +); } } @@ -81,49 +84,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalBase2_AfterEach2_After_Test; -internal static class TUnit_TestProject_AfterTests_GlobalBase2_AfterEach2_After_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalBase2_AfterEach2_After_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_AfterTests_GlobalBase2_AfterEach2_After_TestInitializer { - global::TUnit.Core.Sources.AfterTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.AfterTests.GlobalBase2), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.AfterTestHooks[typeof(global::TUnit.TestProject.AfterTests.GlobalBase2)].Add( - new InstanceHookMethod + internal static async ValueTask global_TUnit_TestProject_AfterTests_GlobalBase2_AfterEach2_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.AfterTests.GlobalBase2)instance; + await AsyncConvert.Convert(() => typedInstance.AfterEach2()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_AfterTests_GlobalBase2_AfterEach2_After_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterTestHooks, typeof(global::TUnit.TestProject.AfterTests.GlobalBase2), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.AfterTests.GlobalBase2), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalBase2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalBase2)), + Name = "AfterEach2", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalBase2", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.AfterTests.GlobalBase2), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalBase2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalBase2)), - Name = "AfterEach2", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalBase2", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalBase2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalBase2)), - Name = "GlobalBase2", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), - Body = global_TUnit_TestProject_AfterTests_GlobalBase2_AfterEach2_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_GlobalBase2_AfterEach2_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.AfterTests.GlobalBase2)instance; - await AsyncConvert.Convert(() => typedInstance.AfterEach2()); + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalBase2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalBase2)), + Name = "GlobalBase2", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalBase2_AfterEach2_After_Test.TUnit_TestProject_AfterTests_GlobalBase2_AfterEach2_After_TestInitializer.global_TUnit_TestProject_AfterTests_GlobalBase2_AfterEach2_0Params_Body + } +); } } @@ -147,49 +153,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalBase3_AfterEach3_After_Test; -internal static class TUnit_TestProject_AfterTests_GlobalBase3_AfterEach3_After_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalBase3_AfterEach3_After_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_AfterTests_GlobalBase3_AfterEach3_After_TestInitializer { - global::TUnit.Core.Sources.AfterTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.AfterTests.GlobalBase3), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.AfterTestHooks[typeof(global::TUnit.TestProject.AfterTests.GlobalBase3)].Add( - new InstanceHookMethod + internal static async ValueTask global_TUnit_TestProject_AfterTests_GlobalBase3_AfterEach3_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.AfterTests.GlobalBase3)instance; + await AsyncConvert.Convert(() => typedInstance.AfterEach3()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_AfterTests_GlobalBase3_AfterEach3_After_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterTestHooks, typeof(global::TUnit.TestProject.AfterTests.GlobalBase3), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.AfterTests.GlobalBase3), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalBase3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalBase3)), + Name = "AfterEach3", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalBase3", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.AfterTests.GlobalBase3), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalBase3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalBase3)), - Name = "AfterEach3", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalBase3", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalBase3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalBase3)), - Name = "GlobalBase3", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), - Body = global_TUnit_TestProject_AfterTests_GlobalBase3_AfterEach3_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_GlobalBase3_AfterEach3_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.AfterTests.GlobalBase3)instance; - await AsyncConvert.Convert(() => typedInstance.AfterEach3()); + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalBase3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalBase3)), + Name = "GlobalBase3", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalBase3_AfterEach3_After_Test.TUnit_TestProject_AfterTests_GlobalBase3_AfterEach3_After_TestInitializer.global_TUnit_TestProject_AfterTests_GlobalBase3_AfterEach3_0Params_Body + } +); } } @@ -213,49 +222,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUp_After_Test; -internal static class TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUp_After_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUp_After_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUp_After_TestInitializer { - global::TUnit.Core.Sources.AfterTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.AfterTestHooks[typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)].Add( - new InstanceHookMethod + internal static async ValueTask global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUp_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)instance; + await AsyncConvert.Convert(() => typedInstance.CleanUp()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUp_After_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterTestHooks, typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), + Name = "CleanUp", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalCleanUpTests", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), - Name = "CleanUp", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalCleanUpTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), - Name = "GlobalCleanUpTests", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), - Body = global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUp_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUp_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)instance; - await AsyncConvert.Convert(() => typedInstance.CleanUp()); + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), + Name = "GlobalCleanUpTests", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUp_After_Test.TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUp_After_TestInitializer.global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUp_0Params_Body + } +); } } @@ -279,52 +291,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUp__CancellationToken_After_Test; -internal static class TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUp__CancellationToken_After_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUp__CancellationToken_After_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUp__CancellationToken_After_TestInitializer { - global::TUnit.Core.Sources.AfterTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.AfterTestHooks[typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)].Add( - new InstanceHookMethod + internal static async ValueTask global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUp_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)instance; + await AsyncConvert.Convert(() => typedInstance.CleanUp(cancellationToken)); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUp__CancellationToken_After_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterTestHooks, typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), + Name = "CleanUp", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests).GetMethod("CleanUp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalCleanUpTests", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), - Name = "CleanUp", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests).GetMethod("CleanUp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalCleanUpTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), - Name = "GlobalCleanUpTests", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), - Body = global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUp_1Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUp_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)instance; - await AsyncConvert.Convert(() => typedInstance.CleanUp(cancellationToken)); + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), + Name = "GlobalCleanUpTests", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUp__CancellationToken_After_Test.TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUp__CancellationToken_After_TestInitializer.global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUp_1Params_Body + } +); } } @@ -348,52 +363,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUpWithContext__TestContext_After_Test; -internal static class TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUpWithContext__TestContext_After_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUpWithContext__TestContext_After_Test +{ + internal static class TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUpWithContext__TestContext_After_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUpWithContext_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)instance; + await AsyncConvert.Convert(() => typedInstance.CleanUpWithContext(context)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUpWithContext__TestContext_After_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterTestHooks, typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), + new InstanceHookMethod { - global::TUnit.Core.Sources.AfterTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.AfterTestHooks[typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), + Name = "CleanUpWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] { - InitClassType = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), - Name = "CleanUpWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests).GetMethod("CleanUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalCleanUpTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), - Name = "GlobalCleanUpTests", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), - Body = global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUpWithContext_1Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUpWithContext_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)instance; - await AsyncConvert.Convert(() => typedInstance.CleanUpWithContext(context)); + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests).GetMethod("CleanUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalCleanUpTests", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), + Name = "GlobalCleanUpTests", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUpWithContext__TestContext_After_Test.TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUpWithContext__TestContext_After_TestInitializer.global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUpWithContext_1Params_Body + } +); } } @@ -417,53 +435,56 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUpWithContext__TestContext_CancellationToken_After_Test; -internal static class TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUpWithContext__TestContext_CancellationToken_After_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUpWithContext__TestContext_CancellationToken_After_Test +{ + internal static class TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUpWithContext__TestContext_CancellationToken_After_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUpWithContext_2Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)instance; + await AsyncConvert.Convert(() => typedInstance.CleanUpWithContext(context, cancellationToken)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration { - global::TUnit.Core.Sources.AfterTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.AfterTestHooks[typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)].Add( - new InstanceHookMethod + static readonly int _h_TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUpWithContext__TestContext_CancellationToken_After_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterTestHooks, typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), + Name = "CleanUpWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests).GetMethod("CleanUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests).GetMethod("CleanUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalCleanUpTests", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), - Name = "CleanUpWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests).GetMethod("CleanUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests).GetMethod("CleanUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalCleanUpTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), - Name = "GlobalCleanUpTests", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), - Body = global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUpWithContext_2Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUpWithContext_2Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)instance; - await AsyncConvert.Convert(() => typedInstance.CleanUpWithContext(context, cancellationToken)); + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), + Name = "GlobalCleanUpTests", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUpWithContext__TestContext_CancellationToken_After_Test.TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUpWithContext__TestContext_CancellationToken_After_TestInitializer.global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_CleanUpWithContext_2Params_Body + } +); } } @@ -487,51 +508,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalBase1_AfterAll1__TestContext_AfterEvery_Test; -internal static class TUnit_TestProject_AfterTests_GlobalBase1_AfterAll1__TestContext_AfterEvery_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalBase1_AfterAll1__TestContext_AfterEvery_Test +{ + internal static class TUnit_TestProject_AfterTests_GlobalBase1_AfterAll1__TestContext_AfterEvery_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_AfterTests_GlobalBase1_AfterAll1_1Params_Body(TestContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.GlobalBase1.AfterAll1(context)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_AfterTests_GlobalBase1_AfterAll1__TestContext_AfterEvery_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterEveryTestHooks, + new AfterTestHookMethod { - global::TUnit.Core.Sources.AfterEveryTestHooks.Add( - new AfterTestHookMethod + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalBase1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalBase1)), + Name = "AfterAll1", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalBase1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalBase1)), - Name = "AfterAll1", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalBase1).GetMethod("AfterAll1", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalBase1", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalBase1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalBase1)), - Name = "GlobalBase1", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterEveryTestHookIndex(), - Body = global_TUnit_TestProject_AfterTests_GlobalBase1_AfterAll1_1Params_Body, - FilePath = @"", - LineNumber = 5 - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_GlobalBase1_AfterAll1_1Params_Body(TestContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.GlobalBase1.AfterAll1(context)); + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalBase1).GetMethod("AfterAll1", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalBase1", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalBase1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalBase1)), + Name = "GlobalBase1", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterEveryTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalBase1_AfterAll1__TestContext_AfterEvery_Test.TUnit_TestProject_AfterTests_GlobalBase1_AfterAll1__TestContext_AfterEvery_TestInitializer.global_TUnit_TestProject_AfterTests_GlobalBase1_AfterAll1_1Params_Body, + FilePath = @"", + LineNumber = 5 + } +); } } @@ -555,51 +580,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalBase2_AfterAll2__TestContext_AfterEvery_Test; -internal static class TUnit_TestProject_AfterTests_GlobalBase2_AfterAll2__TestContext_AfterEvery_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalBase2_AfterAll2__TestContext_AfterEvery_Test +{ + internal static class TUnit_TestProject_AfterTests_GlobalBase2_AfterAll2__TestContext_AfterEvery_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_AfterTests_GlobalBase2_AfterAll2_1Params_Body(TestContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.GlobalBase2.AfterAll2(context)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration { - global::TUnit.Core.Sources.AfterEveryTestHooks.Add( - new AfterTestHookMethod + static readonly int _h_TUnit_TestProject_AfterTests_GlobalBase2_AfterAll2__TestContext_AfterEvery_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterEveryTestHooks, + new AfterTestHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalBase2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalBase2)), + Name = "AfterAll2", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalBase2).GetMethod("AfterAll2", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalBase2", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalBase2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalBase2)), - Name = "AfterAll2", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalBase2).GetMethod("AfterAll2", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalBase2", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalBase2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalBase2)), - Name = "GlobalBase2", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterEveryTestHookIndex(), - Body = global_TUnit_TestProject_AfterTests_GlobalBase2_AfterAll2_1Params_Body, - FilePath = @"", - LineNumber = 20 - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_GlobalBase2_AfterAll2_1Params_Body(TestContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.GlobalBase2.AfterAll2(context)); + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalBase2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalBase2)), + Name = "GlobalBase2", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterEveryTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalBase2_AfterAll2__TestContext_AfterEvery_Test.TUnit_TestProject_AfterTests_GlobalBase2_AfterAll2__TestContext_AfterEvery_TestInitializer.global_TUnit_TestProject_AfterTests_GlobalBase2_AfterAll2_1Params_Body, + FilePath = @"", + LineNumber = 20 + } +); } } @@ -623,51 +652,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalBase3_AfterAll3__TestContext_AfterEvery_Test; -internal static class TUnit_TestProject_AfterTests_GlobalBase3_AfterAll3__TestContext_AfterEvery_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalBase3_AfterAll3__TestContext_AfterEvery_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_AfterTests_GlobalBase3_AfterAll3__TestContext_AfterEvery_TestInitializer { - global::TUnit.Core.Sources.AfterEveryTestHooks.Add( - new AfterTestHookMethod + internal static async ValueTask global_TUnit_TestProject_AfterTests_GlobalBase3_AfterAll3_1Params_Body(TestContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.GlobalBase3.AfterAll3(context)); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_AfterTests_GlobalBase3_AfterAll3__TestContext_AfterEvery_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterEveryTestHooks, + new AfterTestHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalBase3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalBase3)), + Name = "AfterAll3", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalBase3).GetMethod("AfterAll3", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalBase3", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalBase3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalBase3)), - Name = "AfterAll3", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalBase3).GetMethod("AfterAll3", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalBase3", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalBase3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalBase3)), - Name = "GlobalBase3", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterEveryTestHookIndex(), - Body = global_TUnit_TestProject_AfterTests_GlobalBase3_AfterAll3_1Params_Body, - FilePath = @"", - LineNumber = 35 - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_GlobalBase3_AfterAll3_1Params_Body(TestContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.GlobalBase3.AfterAll3(context)); + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalBase3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalBase3)), + Name = "GlobalBase3", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterEveryTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalBase3_AfterAll3__TestContext_AfterEvery_Test.TUnit_TestProject_AfterTests_GlobalBase3_AfterAll3__TestContext_AfterEvery_TestInitializer.global_TUnit_TestProject_AfterTests_GlobalBase3_AfterAll3_1Params_Body, + FilePath = @"", + LineNumber = 35 + } +); } } @@ -691,51 +724,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUp__TestContext_AfterEvery_Test; -internal static class TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUp__TestContext_AfterEvery_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUp__TestContext_AfterEvery_Test +{ + internal static class TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUp__TestContext_AfterEvery_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUp_1Params_Body(TestContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.GlobalCleanUpTests.AfterAllCleanUp(context)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUp__TestContext_AfterEvery_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterEveryTestHooks, + new AfterTestHookMethod { - global::TUnit.Core.Sources.AfterEveryTestHooks.Add( - new AfterTestHookMethod + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), + Name = "AfterAllCleanUp", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), - Name = "AfterAllCleanUp", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests).GetMethod("AfterAllCleanUp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalCleanUpTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), - Name = "GlobalCleanUpTests", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterEveryTestHookIndex(), - Body = global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUp_1Params_Body, - FilePath = @"", - LineNumber = 50 - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUp_1Params_Body(TestContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.GlobalCleanUpTests.AfterAllCleanUp(context)); + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests).GetMethod("AfterAllCleanUp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalCleanUpTests", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), + Name = "GlobalCleanUpTests", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterEveryTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUp__TestContext_AfterEvery_Test.TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUp__TestContext_AfterEvery_TestInitializer.global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUp_1Params_Body, + FilePath = @"", + LineNumber = 50 + } +); } } @@ -759,52 +796,56 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUp__TestContext_CancellationToken_AfterEvery_Test; -internal static class TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUp__TestContext_CancellationToken_AfterEvery_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUp__TestContext_CancellationToken_AfterEvery_Test +{ + internal static class TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUp__TestContext_CancellationToken_AfterEvery_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUp_2Params_Body(TestContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.GlobalCleanUpTests.AfterAllCleanUp(context, cancellationToken)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration { - global::TUnit.Core.Sources.AfterEveryTestHooks.Add( - new AfterTestHookMethod + static readonly int _h_TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUp__TestContext_CancellationToken_AfterEvery_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterEveryTestHooks, + new AfterTestHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), + Name = "AfterAllCleanUp", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests).GetMethod("AfterAllCleanUp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests).GetMethod("AfterAllCleanUp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalCleanUpTests", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), - Name = "AfterAllCleanUp", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests).GetMethod("AfterAllCleanUp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests).GetMethod("AfterAllCleanUp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalCleanUpTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), - Name = "GlobalCleanUpTests", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterEveryTestHookIndex(), - Body = global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUp_2Params_Body, - FilePath = @"", - LineNumber = 56 - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUp_2Params_Body(TestContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.GlobalCleanUpTests.AfterAllCleanUp(context, cancellationToken)); + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), + Name = "GlobalCleanUpTests", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterEveryTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUp__TestContext_CancellationToken_AfterEvery_Test.TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUp__TestContext_CancellationToken_AfterEvery_TestInitializer.global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUp_2Params_Body, + FilePath = @"", + LineNumber = 56 + } +); } } @@ -828,51 +869,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUpWithContext__TestContext_AfterEvery_Test; -internal static class TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUpWithContext__TestContext_AfterEvery_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUpWithContext__TestContext_AfterEvery_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUpWithContext__TestContext_AfterEvery_TestInitializer { - global::TUnit.Core.Sources.AfterEveryTestHooks.Add( - new AfterTestHookMethod + internal static async ValueTask global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUpWithContext_1Params_Body(TestContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.GlobalCleanUpTests.AfterAllCleanUpWithContext(context)); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUpWithContext__TestContext_AfterEvery_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterEveryTestHooks, + new AfterTestHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), + Name = "AfterAllCleanUpWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests).GetMethod("AfterAllCleanUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalCleanUpTests", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), - Name = "AfterAllCleanUpWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests).GetMethod("AfterAllCleanUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalCleanUpTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), - Name = "GlobalCleanUpTests", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterEveryTestHookIndex(), - Body = global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUpWithContext_1Params_Body, - FilePath = @"", - LineNumber = 62 - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUpWithContext_1Params_Body(TestContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.GlobalCleanUpTests.AfterAllCleanUpWithContext(context)); + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), + Name = "GlobalCleanUpTests", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterEveryTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUpWithContext__TestContext_AfterEvery_Test.TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUpWithContext__TestContext_AfterEvery_TestInitializer.global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUpWithContext_1Params_Body, + FilePath = @"", + LineNumber = 62 + } +); } } @@ -896,51 +941,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUpWithContext__TestContext_CancellationToken_AfterEvery_Test; -internal static class TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUpWithContext__TestContext_CancellationToken_AfterEvery_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUpWithContext__TestContext_CancellationToken_AfterEvery_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUpWithContext__TestContext_CancellationToken_AfterEvery_TestInitializer { - global::TUnit.Core.Sources.AfterEveryTestHooks.Add( - new AfterTestHookMethod + internal static async ValueTask global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUpWithContext_2Params_Body(TestContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.GlobalCleanUpTests.AfterAllCleanUpWithContext(context, cancellationToken)); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUpWithContext__TestContext_CancellationToken_AfterEvery_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterEveryTestHooks, + new AfterTestHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), + Name = "AfterAllCleanUpWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), - Name = "AfterAllCleanUpWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests).GetMethod("AfterAllCleanUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests).GetMethod("AfterAllCleanUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalCleanUpTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), - Name = "GlobalCleanUpTests", - Namespace = "TUnit.TestProject.AfterTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterEveryTestHookIndex(), - Body = global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUpWithContext_2Params_Body, - FilePath = @"", - LineNumber = 68 - } - ); - } - private static async ValueTask global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUpWithContext_2Params_Body(TestContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.AfterTests.GlobalCleanUpTests.AfterAllCleanUpWithContext(context, cancellationToken)); + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests).GetMethod("AfterAllCleanUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests).GetMethod("AfterAllCleanUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AfterTests.GlobalCleanUpTests", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AfterTests.GlobalCleanUpTests)), + Name = "GlobalCleanUpTests", + Namespace = "TUnit.TestProject.AfterTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterEveryTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUpWithContext__TestContext_CancellationToken_AfterEvery_Test.TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUpWithContext__TestContext_CancellationToken_AfterEvery_TestInitializer.global_TUnit_TestProject_AfterTests_GlobalCleanUpTests_AfterAllCleanUpWithContext_2Params_Body, + FilePath = @"", + LineNumber = 68 + } +); } } diff --git a/TUnit.Core.SourceGenerator.Tests/GlobalStaticBeforeEachTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/GlobalStaticBeforeEachTests.Test.verified.txt index 0021d7506f..9ae95afd01 100644 --- a/TUnit.Core.SourceGenerator.Tests/GlobalStaticBeforeEachTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/GlobalStaticBeforeEachTests.Test.verified.txt @@ -15,49 +15,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalBase1_BeforeEach1_Before_Test; -internal static class TUnit_TestProject_BeforeTests_GlobalBase1_BeforeEach1_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalBase1_BeforeEach1_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_GlobalBase1_BeforeEach1_Before_TestInitializer { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase1), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.GlobalBase1)].Add( - new InstanceHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalBase1_BeforeEach1_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.GlobalBase1)instance; + await AsyncConvert.Convert(() => typedInstance.BeforeEach1()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_GlobalBase1_BeforeEach1_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.GlobalBase1), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase1), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase1)), + Name = "BeforeEach1", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalBase1", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase1), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase1)), - Name = "BeforeEach1", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalBase1", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase1)), - Name = "GlobalBase1", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_GlobalBase1_BeforeEach1_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalBase1_BeforeEach1_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.GlobalBase1)instance; - await AsyncConvert.Convert(() => typedInstance.BeforeEach1()); + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase1)), + Name = "GlobalBase1", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalBase1_BeforeEach1_Before_Test.TUnit_TestProject_BeforeTests_GlobalBase1_BeforeEach1_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_GlobalBase1_BeforeEach1_0Params_Body + } +); } } @@ -81,49 +84,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalBase2_BeforeEach2_Before_Test; -internal static class TUnit_TestProject_BeforeTests_GlobalBase2_BeforeEach2_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalBase2_BeforeEach2_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_GlobalBase2_BeforeEach2_Before_TestInitializer { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase2), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.GlobalBase2)].Add( - new InstanceHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalBase2_BeforeEach2_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.GlobalBase2)instance; + await AsyncConvert.Convert(() => typedInstance.BeforeEach2()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_GlobalBase2_BeforeEach2_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.GlobalBase2), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase2), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase2)), + Name = "BeforeEach2", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalBase2", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase2), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase2)), - Name = "BeforeEach2", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalBase2", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase2)), - Name = "GlobalBase2", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_GlobalBase2_BeforeEach2_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalBase2_BeforeEach2_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.GlobalBase2)instance; - await AsyncConvert.Convert(() => typedInstance.BeforeEach2()); + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase2)), + Name = "GlobalBase2", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalBase2_BeforeEach2_Before_Test.TUnit_TestProject_BeforeTests_GlobalBase2_BeforeEach2_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_GlobalBase2_BeforeEach2_0Params_Body + } +); } } @@ -147,49 +153,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalBase3_BeforeEach3_Before_Test; -internal static class TUnit_TestProject_BeforeTests_GlobalBase3_BeforeEach3_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalBase3_BeforeEach3_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_GlobalBase3_BeforeEach3_Before_TestInitializer { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase3), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.GlobalBase3)].Add( - new InstanceHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalBase3_BeforeEach3_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.GlobalBase3)instance; + await AsyncConvert.Convert(() => typedInstance.BeforeEach3()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_GlobalBase3_BeforeEach3_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.GlobalBase3), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase3), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase3)), + Name = "BeforeEach3", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalBase3", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase3), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase3)), - Name = "BeforeEach3", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalBase3", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase3)), - Name = "GlobalBase3", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_GlobalBase3_BeforeEach3_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalBase3_BeforeEach3_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.GlobalBase3)instance; - await AsyncConvert.Convert(() => typedInstance.BeforeEach3()); + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase3)), + Name = "GlobalBase3", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalBase3_BeforeEach3_Before_Test.TUnit_TestProject_BeforeTests_GlobalBase3_BeforeEach3_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_GlobalBase3_BeforeEach3_0Params_Body + } +); } } @@ -213,49 +222,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUp_Before_Test; -internal static class TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUp_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUp_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUp_Before_TestInitializer { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)].Add( - new InstanceHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUp_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)instance; + await AsyncConvert.Convert(() => typedInstance.SetUp()); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUp_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), + Name = "SetUp", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalSetUpTests", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), - Name = "SetUp", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalSetUpTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), - Name = "GlobalSetUpTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUp_0Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUp_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)instance; - await AsyncConvert.Convert(() => typedInstance.SetUp()); + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), + Name = "GlobalSetUpTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUp_Before_Test.TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUp_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUp_0Params_Body + } +); } } @@ -279,52 +291,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUp__CancellationToken_Before_Test; -internal static class TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUp__CancellationToken_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUp__CancellationToken_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUp__CancellationToken_Before_TestInitializer { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)].Add( - new InstanceHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUp_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)instance; + await AsyncConvert.Convert(() => typedInstance.SetUp(cancellationToken)); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUp__CancellationToken_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), + Name = "SetUp", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests).GetMethod("SetUp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalSetUpTests", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), - Name = "SetUp", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests).GetMethod("SetUp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalSetUpTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), - Name = "GlobalSetUpTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUp_1Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUp_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)instance; - await AsyncConvert.Convert(() => typedInstance.SetUp(cancellationToken)); + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), + Name = "GlobalSetUpTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUp__CancellationToken_Before_Test.TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUp__CancellationToken_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUp_1Params_Body + } +); } } @@ -348,52 +363,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUpWithContext__TestContext_Before_Test; -internal static class TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUpWithContext__TestContext_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUpWithContext__TestContext_Before_Test +{ + internal static class TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUpWithContext__TestContext_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUpWithContext_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)instance; + await AsyncConvert.Convert(() => typedInstance.SetUpWithContext(context)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUpWithContext__TestContext_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), + new InstanceHookMethod { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)].Add( - new InstanceHookMethod + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), + Name = "SetUpWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), - Name = "SetUpWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests).GetMethod("SetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalSetUpTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), - Name = "GlobalSetUpTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUpWithContext_1Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUpWithContext_1Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)instance; - await AsyncConvert.Convert(() => typedInstance.SetUpWithContext(context)); + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests).GetMethod("SetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalSetUpTests", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), + Name = "GlobalSetUpTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUpWithContext__TestContext_Before_Test.TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUpWithContext__TestContext_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUpWithContext_1Params_Body + } +); } } @@ -417,53 +435,56 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUpWithContext__TestContext_CancellationToken_Before_Test; -internal static class TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUpWithContext__TestContext_CancellationToken_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUpWithContext__TestContext_CancellationToken_Before_Test +{ + internal static class TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUpWithContext__TestContext_CancellationToken_Before_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUpWithContext_2Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)instance; + await AsyncConvert.Convert(() => typedInstance.SetUpWithContext(context, cancellationToken)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)].Add( - new InstanceHookMethod + static readonly int _h_TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUpWithContext__TestContext_CancellationToken_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), + Name = "SetUpWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests).GetMethod("SetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests).GetMethod("SetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalSetUpTests", new global::TUnit.Core.ClassMetadata { - InitClassType = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), - Name = "SetUpWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "testContext", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests).GetMethod("SetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests).GetMethod("SetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalSetUpTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), - Name = "GlobalSetUpTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUpWithContext_2Params_Body - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUpWithContext_2Params_Body(object instance, TestContext context, CancellationToken cancellationToken) - { - var typedInstance = (global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)instance; - await AsyncConvert.Convert(() => typedInstance.SetUpWithContext(context, cancellationToken)); + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), + Name = "GlobalSetUpTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUpWithContext__TestContext_CancellationToken_Before_Test.TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUpWithContext__TestContext_CancellationToken_Before_TestInitializer.global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_SetUpWithContext_2Params_Body + } +); } } @@ -487,51 +508,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalBase1_BeforeAll1__TestContext_BeforeEvery_Test; -internal static class TUnit_TestProject_BeforeTests_GlobalBase1_BeforeAll1__TestContext_BeforeEvery_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalBase1_BeforeAll1__TestContext_BeforeEvery_Test +{ + internal static class TUnit_TestProject_BeforeTests_GlobalBase1_BeforeAll1__TestContext_BeforeEvery_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalBase1_BeforeAll1_1Params_Body(TestContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.GlobalBase1.BeforeAll1(context)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_GlobalBase1_BeforeAll1__TestContext_BeforeEvery_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeEveryTestHooks, + new BeforeTestHookMethod { - global::TUnit.Core.Sources.BeforeEveryTestHooks.Add( - new BeforeTestHookMethod + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase1)), + Name = "BeforeAll1", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase1)), - Name = "BeforeAll1", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalBase1).GetMethod("BeforeAll1", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalBase1", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase1), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase1)), - Name = "GlobalBase1", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeEveryTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_GlobalBase1_BeforeAll1_1Params_Body, - FilePath = @"", - LineNumber = 5 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalBase1_BeforeAll1_1Params_Body(TestContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.GlobalBase1.BeforeAll1(context)); + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalBase1).GetMethod("BeforeAll1", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalBase1", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase1), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase1)), + Name = "GlobalBase1", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeEveryTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalBase1_BeforeAll1__TestContext_BeforeEvery_Test.TUnit_TestProject_BeforeTests_GlobalBase1_BeforeAll1__TestContext_BeforeEvery_TestInitializer.global_TUnit_TestProject_BeforeTests_GlobalBase1_BeforeAll1_1Params_Body, + FilePath = @"", + LineNumber = 5 + } +); } } @@ -555,51 +580,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalBase2_BeforeAll2__TestContext_BeforeEvery_Test; -internal static class TUnit_TestProject_BeforeTests_GlobalBase2_BeforeAll2__TestContext_BeforeEvery_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalBase2_BeforeAll2__TestContext_BeforeEvery_Test +{ + internal static class TUnit_TestProject_BeforeTests_GlobalBase2_BeforeAll2__TestContext_BeforeEvery_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalBase2_BeforeAll2_1Params_Body(TestContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.GlobalBase2.BeforeAll2(context)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration { - global::TUnit.Core.Sources.BeforeEveryTestHooks.Add( - new BeforeTestHookMethod + static readonly int _h_TUnit_TestProject_BeforeTests_GlobalBase2_BeforeAll2__TestContext_BeforeEvery_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeEveryTestHooks, + new BeforeTestHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase2)), + Name = "BeforeAll2", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalBase2).GetMethod("BeforeAll2", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalBase2", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase2)), - Name = "BeforeAll2", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalBase2).GetMethod("BeforeAll2", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalBase2", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase2), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase2)), - Name = "GlobalBase2", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeEveryTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_GlobalBase2_BeforeAll2_1Params_Body, - FilePath = @"", - LineNumber = 20 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalBase2_BeforeAll2_1Params_Body(TestContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.GlobalBase2.BeforeAll2(context)); + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase2), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase2)), + Name = "GlobalBase2", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeEveryTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalBase2_BeforeAll2__TestContext_BeforeEvery_Test.TUnit_TestProject_BeforeTests_GlobalBase2_BeforeAll2__TestContext_BeforeEvery_TestInitializer.global_TUnit_TestProject_BeforeTests_GlobalBase2_BeforeAll2_1Params_Body, + FilePath = @"", + LineNumber = 20 + } +); } } @@ -623,51 +652,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalBase3_BeforeAll3__TestContext_BeforeEvery_Test; -internal static class TUnit_TestProject_BeforeTests_GlobalBase3_BeforeAll3__TestContext_BeforeEvery_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalBase3_BeforeAll3__TestContext_BeforeEvery_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_GlobalBase3_BeforeAll3__TestContext_BeforeEvery_TestInitializer { - global::TUnit.Core.Sources.BeforeEveryTestHooks.Add( - new BeforeTestHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalBase3_BeforeAll3_1Params_Body(TestContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.GlobalBase3.BeforeAll3(context)); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_GlobalBase3_BeforeAll3__TestContext_BeforeEvery_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeEveryTestHooks, + new BeforeTestHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase3)), + Name = "BeforeAll3", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalBase3).GetMethod("BeforeAll3", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalBase3", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase3)), - Name = "BeforeAll3", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalBase3).GetMethod("BeforeAll3", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalBase3", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase3), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase3)), - Name = "GlobalBase3", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeEveryTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_GlobalBase3_BeforeAll3_1Params_Body, - FilePath = @"", - LineNumber = 35 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalBase3_BeforeAll3_1Params_Body(TestContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.GlobalBase3.BeforeAll3(context)); + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalBase3), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalBase3)), + Name = "GlobalBase3", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeEveryTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalBase3_BeforeAll3__TestContext_BeforeEvery_Test.TUnit_TestProject_BeforeTests_GlobalBase3_BeforeAll3__TestContext_BeforeEvery_TestInitializer.global_TUnit_TestProject_BeforeTests_GlobalBase3_BeforeAll3_1Params_Body, + FilePath = @"", + LineNumber = 35 + } +); } } @@ -691,51 +724,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUp__TestContext_BeforeEvery_Test; -internal static class TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUp__TestContext_BeforeEvery_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUp__TestContext_BeforeEvery_Test +{ + internal static class TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUp__TestContext_BeforeEvery_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUp_1Params_Body(TestContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.GlobalSetUpTests.BeforeAllSetUp(context)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUp__TestContext_BeforeEvery_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeEveryTestHooks, + new BeforeTestHookMethod { - global::TUnit.Core.Sources.BeforeEveryTestHooks.Add( - new BeforeTestHookMethod + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), + Name = "BeforeAllSetUp", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), - Name = "BeforeAllSetUp", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests).GetMethod("BeforeAllSetUp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalSetUpTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), - Name = "GlobalSetUpTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeEveryTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUp_1Params_Body, - FilePath = @"", - LineNumber = 50 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUp_1Params_Body(TestContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.GlobalSetUpTests.BeforeAllSetUp(context)); + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests).GetMethod("BeforeAllSetUp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalSetUpTests", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), + Name = "GlobalSetUpTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeEveryTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUp__TestContext_BeforeEvery_Test.TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUp__TestContext_BeforeEvery_TestInitializer.global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUp_1Params_Body, + FilePath = @"", + LineNumber = 50 + } +); } } @@ -759,52 +796,56 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUp__TestContext_CancellationToken_BeforeEvery_Test; -internal static class TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUp__TestContext_CancellationToken_BeforeEvery_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUp__TestContext_CancellationToken_BeforeEvery_Test +{ + internal static class TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUp__TestContext_CancellationToken_BeforeEvery_TestInitializer + { + internal static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUp_2Params_Body(TestContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.GlobalSetUpTests.BeforeAllSetUp(context, cancellationToken)); + } + } +} +namespace TUnit.Generated { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static partial class TUnit_HookRegistration { - global::TUnit.Core.Sources.BeforeEveryTestHooks.Add( - new BeforeTestHookMethod + static readonly int _h_TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUp__TestContext_CancellationToken_BeforeEvery_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeEveryTestHooks, + new BeforeTestHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), + Name = "BeforeAllSetUp", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests).GetMethod("BeforeAllSetUp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests).GetMethod("BeforeAllSetUp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalSetUpTests", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), - Name = "BeforeAllSetUp", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests).GetMethod("BeforeAllSetUp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests).GetMethod("BeforeAllSetUp", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalSetUpTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), - Name = "GlobalSetUpTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeEveryTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUp_2Params_Body, - FilePath = @"", - LineNumber = 56 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUp_2Params_Body(TestContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.GlobalSetUpTests.BeforeAllSetUp(context, cancellationToken)); + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), + Name = "GlobalSetUpTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeEveryTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUp__TestContext_CancellationToken_BeforeEvery_Test.TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUp__TestContext_CancellationToken_BeforeEvery_TestInitializer.global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUp_2Params_Body, + FilePath = @"", + LineNumber = 56 + } +); } } @@ -828,51 +869,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUpWithContext__TestContext_BeforeEvery_Test; -internal static class TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUpWithContext__TestContext_BeforeEvery_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUpWithContext__TestContext_BeforeEvery_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUpWithContext__TestContext_BeforeEvery_TestInitializer { - global::TUnit.Core.Sources.BeforeEveryTestHooks.Add( - new BeforeTestHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUpWithContext_1Params_Body(TestContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.GlobalSetUpTests.BeforeAllSetUpWithContext(context)); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUpWithContext__TestContext_BeforeEvery_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeEveryTestHooks, + new BeforeTestHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), + Name = "BeforeAllSetUpWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] + { + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalSetUpTests", new global::TUnit.Core.ClassMetadata { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), - Name = "BeforeAllSetUpWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext) }, null)!.GetParameters()[0]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalSetUpTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), - Name = "GlobalSetUpTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeEveryTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUpWithContext_1Params_Body, - FilePath = @"", - LineNumber = 62 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUpWithContext_1Params_Body(TestContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.GlobalSetUpTests.BeforeAllSetUpWithContext(context)); + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), + Name = "GlobalSetUpTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeEveryTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUpWithContext__TestContext_BeforeEvery_Test.TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUpWithContext__TestContext_BeforeEvery_TestInitializer.global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUpWithContext_1Params_Body, + FilePath = @"", + LineNumber = 62 + } +); } } @@ -896,51 +941,55 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUpWithContext__TestContext_CancellationToken_BeforeEvery_Test; -internal static class TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUpWithContext__TestContext_CancellationToken_BeforeEvery_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUpWithContext__TestContext_CancellationToken_BeforeEvery_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUpWithContext__TestContext_CancellationToken_BeforeEvery_TestInitializer { - global::TUnit.Core.Sources.BeforeEveryTestHooks.Add( - new BeforeTestHookMethod + internal static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUpWithContext_2Params_Body(TestContext context, CancellationToken cancellationToken) + { + await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.GlobalSetUpTests.BeforeAllSetUpWithContext(context, cancellationToken)); + } + } +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration + { + static readonly int _h_TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUpWithContext__TestContext_CancellationToken_BeforeEvery_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeEveryTestHooks, + new BeforeTestHookMethod + { + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), + Name = "BeforeAllSetUpWithContext", + GenericTypeCount = 0, + ReturnType = typeof(global::System.Threading.Tasks.Task), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), + Parameters = new global::TUnit.Core.ParameterMetadata[] { - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), - Name = "BeforeAllSetUpWithContext", - GenericTypeCount = 0, - ReturnType = typeof(global::System.Threading.Tasks.Task), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)), - Parameters = new global::TUnit.Core.ParameterMetadata[] - { - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), - global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) - }, - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalSetUpTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), - Name = "GlobalSetUpTests", - Namespace = "TUnit.TestProject.BeforeTests", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeEveryTestHookIndex(), - Body = global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUpWithContext_2Params_Body, - FilePath = @"", - LineNumber = 68 - } - ); - } - private static async ValueTask global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUpWithContext_2Params_Body(TestContext context, CancellationToken cancellationToken) - { - await AsyncConvert.Convert(() => global::TUnit.TestProject.BeforeTests.GlobalSetUpTests.BeforeAllSetUpWithContext(context, cancellationToken)); + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.Core.TestContext), "context", new global::TUnit.Core.ConcreteType(typeof(global::TUnit.Core.TestContext)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[0]), + global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Threading.CancellationToken), "cancellationToken", new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.CancellationToken)), false, reflectionInfoFactory: static () => typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests).GetMethod("BeforeAllSetUpWithContext", global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Static, null, new global::System.Type[] { typeof(global::TUnit.Core.TestContext), typeof(global::System.Threading.CancellationToken) }, null)!.GetParameters()[1]) + }, + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.BeforeTests.GlobalSetUpTests", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.BeforeTests.GlobalSetUpTests)), + Name = "GlobalSetUpTests", + Namespace = "TUnit.TestProject.BeforeTests", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeEveryTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUpWithContext__TestContext_CancellationToken_BeforeEvery_Test.TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUpWithContext__TestContext_CancellationToken_BeforeEvery_TestInitializer.global_TUnit_TestProject_BeforeTests_GlobalSetUpTests_BeforeAllSetUpWithContext_2Params_Body, + FilePath = @"", + LineNumber = 68 + } +); } } diff --git a/TUnit.Core.SourceGenerator.Tests/Hooks1589.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Hooks1589.Test.verified.txt index 307055a127..aa5d9eaf4e 100644 --- a/TUnit.Core.SourceGenerator.Tests/Hooks1589.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Hooks1589.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -110,9 +110,8 @@ internal static class TUnit_TestProject_Bugs__1589_MyTests__TestSource { return new global::TUnit.TestProject.Bugs._1589.MyTests(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1589.MyTests), TUnit_TestProject_Bugs__1589_MyTests__TestSource.GetTests, TUnit_TestProject_Bugs__1589_MyTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_Bugs__1589_MyTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1589.MyTests), TUnit_TestProject_Bugs__1589_MyTests__TestSource.GetTests, TUnit_TestProject_Bugs__1589_MyTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/Hooks1594.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Hooks1594.Test.verified.txt index 13e522ea29..60c5e3c5c3 100644 --- a/TUnit.Core.SourceGenerator.Tests/Hooks1594.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Hooks1594.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -111,9 +111,8 @@ internal static class TUnit_TestProject_Bugs__1594_MyTests__TestSource { return new global::TUnit.TestProject.Bugs._1594.MyTests(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1594.MyTests), TUnit_TestProject_Bugs__1594_MyTests__TestSource.GetTests, TUnit_TestProject_Bugs__1594_MyTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_Bugs__1594_MyTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1594.MyTests), TUnit_TestProject_Bugs__1594_MyTests__TestSource.GetTests, TUnit_TestProject_Bugs__1594_MyTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/HooksTests.DisposableFieldTests.verified.txt b/TUnit.Core.SourceGenerator.Tests/HooksTests.DisposableFieldTests.verified.txt index 6673e1a046..05d3d57b98 100644 --- a/TUnit.Core.SourceGenerator.Tests/HooksTests.DisposableFieldTests.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/HooksTests.DisposableFieldTests.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -15,49 +15,52 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_DisposableFieldTests_Setup_Before_Test; -internal static class TUnit_TestProject_DisposableFieldTests_Setup_Before_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_DisposableFieldTests_Setup_Before_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_DisposableFieldTests_Setup_Before_TestInitializer { - global::TUnit.Core.Sources.BeforeTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.DisposableFieldTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.BeforeTestHooks[typeof(global::TUnit.TestProject.DisposableFieldTests)].Add( - new InstanceHookMethod - { - InitClassType = typeof(global::TUnit.TestProject.DisposableFieldTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.DisposableFieldTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.DisposableFieldTests)), - Name = "Setup", - GenericTypeCount = 0, - ReturnType = typeof(void), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(void)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.DisposableFieldTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.DisposableFieldTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.DisposableFieldTests)), - Name = "DisposableFieldTests", - Namespace = "TUnit.TestProject", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), - Body = global_TUnit_TestProject_DisposableFieldTests_Setup_0Params_Body - } - ); + internal static async ValueTask global_TUnit_TestProject_DisposableFieldTests_Setup_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.DisposableFieldTests)instance; + await AsyncConvert.Convert(() => typedInstance.Setup()); + } } - private static async ValueTask global_TUnit_TestProject_DisposableFieldTests_Setup_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration { - var typedInstance = (global::TUnit.TestProject.DisposableFieldTests)instance; - await AsyncConvert.Convert(() => typedInstance.Setup()); + static readonly int _h_TUnit_TestProject_DisposableFieldTests_Setup_Before_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.BeforeTestHooks, typeof(global::TUnit.TestProject.DisposableFieldTests), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.DisposableFieldTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.DisposableFieldTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.DisposableFieldTests)), + Name = "Setup", + GenericTypeCount = 0, + ReturnType = typeof(void), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(void)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.DisposableFieldTests", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.DisposableFieldTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.DisposableFieldTests)), + Name = "DisposableFieldTests", + Namespace = "TUnit.TestProject", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextBeforeTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_DisposableFieldTests_Setup_Before_Test.TUnit_TestProject_DisposableFieldTests_Setup_Before_TestInitializer.global_TUnit_TestProject_DisposableFieldTests_Setup_0Params_Body + } +); } } @@ -81,48 +84,51 @@ using global::TUnit.Core.Hooks; using global::TUnit.Core.Interfaces.SourceGenerator; using global::TUnit.Core.Models; using HookType = global::TUnit.Core.HookType; -namespace TUnit.Generated.Hooks.TUnit_TestProject_DisposableFieldTests_Blah_After_Test; -internal static class TUnit_TestProject_DisposableFieldTests_Blah_After_TestInitializer +namespace TUnit.Generated.Hooks.TUnit_TestProject_DisposableFieldTests_Blah_After_Test { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() + internal static class TUnit_TestProject_DisposableFieldTests_Blah_After_TestInitializer { - global::TUnit.Core.Sources.AfterTestHooks.GetOrAdd(typeof(global::TUnit.TestProject.DisposableFieldTests), static _ => new global::System.Collections.Concurrent.ConcurrentBag()); - global::TUnit.Core.Sources.AfterTestHooks[typeof(global::TUnit.TestProject.DisposableFieldTests)].Add( - new InstanceHookMethod - { - InitClassType = typeof(global::TUnit.TestProject.DisposableFieldTests), - MethodInfo = new global::TUnit.Core.MethodMetadata - { - Type = typeof(global::TUnit.TestProject.DisposableFieldTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.DisposableFieldTests)), - Name = "Blah", - GenericTypeCount = 0, - ReturnType = typeof(void), - ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(void)), - Parameters = global::System.Array.Empty(), - Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.DisposableFieldTests", new global::TUnit.Core.ClassMetadata - { - Type = typeof(global::TUnit.TestProject.DisposableFieldTests), - TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.DisposableFieldTests)), - Name = "DisposableFieldTests", - Namespace = "TUnit.TestProject", - Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), - Parameters = global::System.Array.Empty(), - Properties = global::System.Array.Empty(), - Parent = null - }) - }, - HookExecutor = DefaultExecutor.Instance, - Order = 0, - RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), - Body = global_TUnit_TestProject_DisposableFieldTests_Blah_0Params_Body - } - ); + internal static async ValueTask global_TUnit_TestProject_DisposableFieldTests_Blah_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) + { + var typedInstance = (global::TUnit.TestProject.DisposableFieldTests)instance; + await AsyncConvert.Convert(() => typedInstance.Blah()); + } } - private static async ValueTask global_TUnit_TestProject_DisposableFieldTests_Blah_0Params_Body(object instance, TestContext context, CancellationToken cancellationToken) +} +namespace TUnit.Generated +{ + internal static partial class TUnit_HookRegistration { - var typedInstance = (global::TUnit.TestProject.DisposableFieldTests)instance; - await AsyncConvert.Convert(() => typedInstance.Blah()); + static readonly int _h_TUnit_TestProject_DisposableFieldTests_Blah_After_Test = global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.AfterTestHooks, typeof(global::TUnit.TestProject.DisposableFieldTests), + new InstanceHookMethod + { + InitClassType = typeof(global::TUnit.TestProject.DisposableFieldTests), + MethodInfo = new global::TUnit.Core.MethodMetadata + { + Type = typeof(global::TUnit.TestProject.DisposableFieldTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.DisposableFieldTests)), + Name = "Blah", + GenericTypeCount = 0, + ReturnType = typeof(void), + ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(void)), + Parameters = global::System.Array.Empty(), + Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.DisposableFieldTests", new global::TUnit.Core.ClassMetadata + { + Type = typeof(global::TUnit.TestProject.DisposableFieldTests), + TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.DisposableFieldTests)), + Name = "DisposableFieldTests", + Namespace = "TUnit.TestProject", + Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"), + Parameters = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + Parent = null + }) + }, + HookExecutor = DefaultExecutor.Instance, + Order = 0, + RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNextAfterTestHookIndex(), + Body = global::TUnit.Generated.Hooks.TUnit_TestProject_DisposableFieldTests_Blah_After_Test.TUnit_TestProject_DisposableFieldTests_Blah_After_TestInitializer.global_TUnit_TestProject_DisposableFieldTests_Blah_0Params_Body + } +); } } diff --git a/TUnit.Core.SourceGenerator.Tests/InheritedPropertySetterTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/InheritedPropertySetterTests.Test.verified.txt index df5c85d0c6..917ef801ad 100644 --- a/TUnit.Core.SourceGenerator.Tests/InheritedPropertySetterTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/InheritedPropertySetterTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -600,11 +600,10 @@ internal static class TUnit_TestProject_PropertySetterTests__TestSource Property7 = default!, }; } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.PropertySetterTests), TUnit_TestProject_PropertySetterTests__TestSource.GetTests, TUnit_TestProject_PropertySetterTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_PropertySetterTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.PropertySetterTests), TUnit_TestProject_PropertySetterTests__TestSource.GetTests, TUnit_TestProject_PropertySetterTests__TestSource.EnumerateTestDescriptors); } @@ -868,11 +867,7 @@ internal sealed class TUnit_TestProject_InheritedPropertySetterTests_Test_TestSo } } } -internal static class TUnit_TestProject_InheritedPropertySetterTests_Test_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.InheritedPropertySetterTests), new TUnit_TestProject_InheritedPropertySetterTests_Test_TestSource()); - } + static readonly int _r_TUnit_TestProject_InheritedPropertySetterTests_Test_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.InheritedPropertySetterTests), new TUnit_TestProject_InheritedPropertySetterTests_Test_TestSource()); } diff --git a/TUnit.Core.SourceGenerator.Tests/InheritedTestsFromDifferentProjectTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/InheritedTestsFromDifferentProjectTests.Test.verified.txt index 4e7001a6f2..13eca376f2 100644 --- a/TUnit.Core.SourceGenerator.Tests/InheritedTestsFromDifferentProjectTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/InheritedTestsFromDifferentProjectTests.Test.verified.txt @@ -347,11 +347,10 @@ internal static class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_ { return new global::TUnit.TestProject.InheritedTestsFromDifferentProjectTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.InheritedTestsFromDifferentProjectTests), TUnit_TestProject_InheritedTestsFromDifferentProjectTests__TestSource.GetTests, TUnit_TestProject_InheritedTestsFromDifferentProjectTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_InheritedTestsFromDifferentProjectTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.InheritedTestsFromDifferentProjectTests), TUnit_TestProject_InheritedTestsFromDifferentProjectTests__TestSource.GetTests, TUnit_TestProject_InheritedTestsFromDifferentProjectTests__TestSource.EnumerateTestDescriptors); } @@ -455,13 +454,9 @@ internal sealed class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_ } } } -internal static class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_BaseTest_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.InheritedTestsFromDifferentProjectTests), new TUnit_TestProject_InheritedTestsFromDifferentProjectTests_BaseTest_TestSource()); - } + static readonly int _r_TUnit_TestProject_InheritedTestsFromDifferentProjectTests_BaseTest_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.InheritedTestsFromDifferentProjectTests), new TUnit_TestProject_InheritedTestsFromDifferentProjectTests_BaseTest_TestSource()); } @@ -566,11 +561,7 @@ internal sealed class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_ } } } -internal static class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_BaseTestWithMultipleCategories_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.InheritedTestsFromDifferentProjectTests), new TUnit_TestProject_InheritedTestsFromDifferentProjectTests_BaseTestWithMultipleCategories_TestSource()); - } + static readonly int _r_TUnit_TestProject_InheritedTestsFromDifferentProjectTests_BaseTestWithMultipleCategories_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.InheritedTestsFromDifferentProjectTests), new TUnit_TestProject_InheritedTestsFromDifferentProjectTests_BaseTestWithMultipleCategories_TestSource()); } diff --git a/TUnit.Core.SourceGenerator.Tests/InheritsTestsAbstractTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/InheritsTestsAbstractTests.Test.verified.txt index a334906dc0..9d37c10762 100644 --- a/TUnit.Core.SourceGenerator.Tests/InheritsTestsAbstractTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/InheritsTestsAbstractTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -94,11 +94,10 @@ internal static class TUnit_TestProject_AbstractTests_ConcreteClass2__TestSource { return new global::TUnit.TestProject.AbstractTests.ConcreteClass2(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass2), TUnit_TestProject_AbstractTests_ConcreteClass2__TestSource.GetTests, TUnit_TestProject_AbstractTests_ConcreteClass2__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_AbstractTests_ConcreteClass2__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass2), TUnit_TestProject_AbstractTests_ConcreteClass2__TestSource.GetTests, TUnit_TestProject_AbstractTests_ConcreteClass2__TestSource.EnumerateTestDescriptors); } @@ -199,13 +198,9 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClass } } } -internal static class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClassName_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass2), new TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClassName_TestSource()); - } + static readonly int _r_TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClassName_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass2), new TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClassName_TestSource()); } @@ -305,11 +300,7 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClass } } } -internal static class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass1), new TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource()); - } + static readonly int _r_TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass1), new TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource()); } diff --git a/TUnit.Core.SourceGenerator.Tests/InheritsTestsTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/InheritsTestsTests.Test.verified.txt index 7ea4a41501..04606efcb9 100644 --- a/TUnit.Core.SourceGenerator.Tests/InheritsTestsTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/InheritsTestsTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -210,11 +210,10 @@ internal static class TUnit_TestProject_Bugs__1924_None_BaseClass__TestSource Data = default!, }; } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1924.None.BaseClass), TUnit_TestProject_Bugs__1924_None_BaseClass__TestSource.GetTests, TUnit_TestProject_Bugs__1924_None_BaseClass__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_Bugs__1924_None_BaseClass__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1924.None.BaseClass), TUnit_TestProject_Bugs__1924_None_BaseClass__TestSource.GetTests, TUnit_TestProject_Bugs__1924_None_BaseClass__TestSource.EnumerateTestDescriptors); } @@ -366,13 +365,9 @@ internal sealed class TUnit_TestProject_Bugs__1924_None_Tests_Test__int_TestSour } } } -internal static class TUnit_TestProject_Bugs__1924_None_Tests_Test__int_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1924.None.Tests), new TUnit_TestProject_Bugs__1924_None_Tests_Test__int_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__1924_None_Tests_Test__int_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1924.None.Tests), new TUnit_TestProject_Bugs__1924_None_Tests_Test__int_TestSource()); } @@ -524,13 +519,9 @@ internal sealed class TUnit_TestProject_Bugs__1924_None_Tests2_Test__int_TestSou } } } -internal static class TUnit_TestProject_Bugs__1924_None_Tests2_Test__int_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1924.None.Tests2), new TUnit_TestProject_Bugs__1924_None_Tests2_Test__int_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__1924_None_Tests2_Test__int_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1924.None.Tests2), new TUnit_TestProject_Bugs__1924_None_Tests2_Test__int_TestSource()); } @@ -682,11 +673,7 @@ internal sealed class TUnit_TestProject_Bugs__1924_None_Tests3_Test__int_TestSou } } } -internal static class TUnit_TestProject_Bugs__1924_None_Tests3_Test__int_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1924.None.Tests3), new TUnit_TestProject_Bugs__1924_None_Tests3_Test__int_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__1924_None_Tests3_Test__int_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1924.None.Tests3), new TUnit_TestProject_Bugs__1924_None_Tests3_Test__int_TestSource()); } diff --git a/TUnit.Core.SourceGenerator.Tests/Issue2887Tests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Issue2887Tests.Test.verified.txt index 263b89a242..05679e8921 100644 --- a/TUnit.Core.SourceGenerator.Tests/Issue2887Tests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Issue2887Tests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -100,9 +100,8 @@ internal static class TUnit_TestProject_Bugs__Issue2887_ActualTestClass__TestSou // ClassConstructor attribute is present - instance creation handled at runtime throw new global::System.NotSupportedException("Instance creation for classes with ClassConstructor attribute is handled at runtime"); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._Issue2887.ActualTestClass), TUnit_TestProject_Bugs__Issue2887_ActualTestClass__TestSource.GetTests, TUnit_TestProject_Bugs__Issue2887_ActualTestClass__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_Bugs__Issue2887_ActualTestClass__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._Issue2887.ActualTestClass), TUnit_TestProject_Bugs__Issue2887_ActualTestClass__TestSource.GetTests, TUnit_TestProject_Bugs__Issue2887_ActualTestClass__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/MatrixTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/MatrixTests.Test.verified.txt index 45b13c9673..2527b9bcee 100644 --- a/TUnit.Core.SourceGenerator.Tests/MatrixTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/MatrixTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -1063,9 +1063,8 @@ internal static class TUnit_TestProject_MatrixTests__TestSource { return new global::TUnit.TestProject.MatrixTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.MatrixTests), TUnit_TestProject_MatrixTests__TestSource.GetTests, TUnit_TestProject_MatrixTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_MatrixTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.MatrixTests), TUnit_TestProject_MatrixTests__TestSource.GetTests, TUnit_TestProject_MatrixTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/MethodDataSourceDrivenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/MethodDataSourceDrivenTests.Test.verified.txt index db451c9fb2..f03011c053 100644 --- a/TUnit.Core.SourceGenerator.Tests/MethodDataSourceDrivenTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/MethodDataSourceDrivenTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -864,9 +864,8 @@ internal static class TUnit_TestProject_MethodDataSourceDrivenTests__TestSource { return new global::TUnit.TestProject.MethodDataSourceDrivenTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.MethodDataSourceDrivenTests), TUnit_TestProject_MethodDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_MethodDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_MethodDataSourceDrivenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.MethodDataSourceDrivenTests), TUnit_TestProject_MethodDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_MethodDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/MethodDataSourceDrivenWithCancellationTokenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/MethodDataSourceDrivenWithCancellationTokenTests.Test.verified.txt index 77ecf4b336..9dd1c6d72b 100644 --- a/TUnit.Core.SourceGenerator.Tests/MethodDataSourceDrivenWithCancellationTokenTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/MethodDataSourceDrivenWithCancellationTokenTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -341,9 +341,8 @@ internal static class TUnit_TestProject_MethodDataSourceDrivenWithCancellationTo { return new global::TUnit.TestProject.MethodDataSourceDrivenWithCancellationTokenTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.MethodDataSourceDrivenWithCancellationTokenTests), TUnit_TestProject_MethodDataSourceDrivenWithCancellationTokenTests__TestSource.GetTests, TUnit_TestProject_MethodDataSourceDrivenWithCancellationTokenTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_MethodDataSourceDrivenWithCancellationTokenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.MethodDataSourceDrivenWithCancellationTokenTests), TUnit_TestProject_MethodDataSourceDrivenWithCancellationTokenTests__TestSource.GetTests, TUnit_TestProject_MethodDataSourceDrivenWithCancellationTokenTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/MultipleClassDataSourceDrivenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/MultipleClassDataSourceDrivenTests.Test.verified.txt index 9b84c0ea9f..ba4a6878df 100644 --- a/TUnit.Core.SourceGenerator.Tests/MultipleClassDataSourceDrivenTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/MultipleClassDataSourceDrivenTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -191,9 +191,8 @@ internal static class TUnit_TestProject_MultipleClassDataSourceDrivenTests__Test { return new global::TUnit.TestProject.MultipleClassDataSourceDrivenTests(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]), global::TUnit.Core.Helpers.CastHelper.Cast(args[3]), global::TUnit.Core.Helpers.CastHelper.Cast(args[4])); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.MultipleClassDataSourceDrivenTests), TUnit_TestProject_MultipleClassDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_MultipleClassDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_MultipleClassDataSourceDrivenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.MultipleClassDataSourceDrivenTests), TUnit_TestProject_MultipleClassDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_MultipleClassDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/NameOfArgumentTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/NameOfArgumentTests.Test.verified.txt index d810de3328..48a66789e8 100644 --- a/TUnit.Core.SourceGenerator.Tests/NameOfArgumentTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/NameOfArgumentTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -114,9 +114,8 @@ internal static class TUnit_TestProject_NameOfArgumentTests__TestSource { return new global::TUnit.TestProject.NameOfArgumentTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.NameOfArgumentTests), TUnit_TestProject_NameOfArgumentTests__TestSource.GetTests, TUnit_TestProject_NameOfArgumentTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_NameOfArgumentTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.NameOfArgumentTests), TUnit_TestProject_NameOfArgumentTests__TestSource.GetTests, TUnit_TestProject_NameOfArgumentTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/NullableByteArgumentTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/NullableByteArgumentTests.Test.verified.txt index 18b6ec33ac..bb4b7fcf1c 100644 --- a/TUnit.Core.SourceGenerator.Tests/NullableByteArgumentTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/NullableByteArgumentTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -198,9 +198,8 @@ internal static class TUnit_TestProject_NullableByteArgumentTests__TestSource { return new global::TUnit.TestProject.NullableByteArgumentTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.NullableByteArgumentTests), TUnit_TestProject_NullableByteArgumentTests__TestSource.GetTests, TUnit_TestProject_NullableByteArgumentTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_NullableByteArgumentTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.NullableByteArgumentTests), TUnit_TestProject_NullableByteArgumentTests__TestSource.GetTests, TUnit_TestProject_NullableByteArgumentTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/NumberArgumentTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/NumberArgumentTests.Test.verified.txt index 88d4197465..724bfb39e3 100644 --- a/TUnit.Core.SourceGenerator.Tests/NumberArgumentTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/NumberArgumentTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -500,9 +500,8 @@ internal static class TUnit_TestProject_NumberArgumentTests__TestSource { return new global::TUnit.TestProject.NumberArgumentTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.NumberArgumentTests), TUnit_TestProject_NumberArgumentTests__TestSource.GetTests, TUnit_TestProject_NumberArgumentTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_NumberArgumentTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.NumberArgumentTests), TUnit_TestProject_NumberArgumentTests__TestSource.GetTests, TUnit_TestProject_NumberArgumentTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/NumberArgumentTests.TestDE.verified.txt b/TUnit.Core.SourceGenerator.Tests/NumberArgumentTests.TestDE.verified.txt index 88d4197465..724bfb39e3 100644 --- a/TUnit.Core.SourceGenerator.Tests/NumberArgumentTests.TestDE.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/NumberArgumentTests.TestDE.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -500,9 +500,8 @@ internal static class TUnit_TestProject_NumberArgumentTests__TestSource { return new global::TUnit.TestProject.NumberArgumentTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.NumberArgumentTests), TUnit_TestProject_NumberArgumentTests__TestSource.GetTests, TUnit_TestProject_NumberArgumentTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_NumberArgumentTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.NumberArgumentTests), TUnit_TestProject_NumberArgumentTests__TestSource.GetTests, TUnit_TestProject_NumberArgumentTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/PriorityFilteringTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/PriorityFilteringTests.Test.verified.txt index e2de3c4e76..3aa41ad3f4 100644 --- a/TUnit.Core.SourceGenerator.Tests/PriorityFilteringTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/PriorityFilteringTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -378,9 +378,8 @@ internal static class TUnit_TestProject_PriorityFilteringTests__TestSource { return new global::TUnit.TestProject.PriorityFilteringTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.PriorityFilteringTests), TUnit_TestProject_PriorityFilteringTests__TestSource.GetTests, TUnit_TestProject_PriorityFilteringTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_PriorityFilteringTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.PriorityFilteringTests), TUnit_TestProject_PriorityFilteringTests__TestSource.GetTests, TUnit_TestProject_PriorityFilteringTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/PropertySetterTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/PropertySetterTests.Test.verified.txt index 8544e06dcf..4b5c5bb687 100644 --- a/TUnit.Core.SourceGenerator.Tests/PropertySetterTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/PropertySetterTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -600,9 +600,8 @@ internal static class TUnit_TestProject_PropertySetterTests__TestSource Property7 = default!, }; } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.PropertySetterTests), TUnit_TestProject_PropertySetterTests__TestSource.GetTests, TUnit_TestProject_PropertySetterTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_PropertySetterTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.PropertySetterTests), TUnit_TestProject_PropertySetterTests__TestSource.GetTests, TUnit_TestProject_PropertySetterTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/RepeatTests.Assembly_Level_Repeat.verified.txt b/TUnit.Core.SourceGenerator.Tests/RepeatTests.Assembly_Level_Repeat.verified.txt index a0d951b5d2..808e066ba6 100644 --- a/TUnit.Core.SourceGenerator.Tests/RepeatTests.Assembly_Level_Repeat.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/RepeatTests.Assembly_Level_Repeat.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -161,9 +161,8 @@ internal static class TUnit_TestProject_AssemblyRepeatTests__TestSource { return new global::TUnit.TestProject.AssemblyRepeatTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.AssemblyRepeatTests), TUnit_TestProject_AssemblyRepeatTests__TestSource.GetTests, TUnit_TestProject_AssemblyRepeatTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_AssemblyRepeatTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.AssemblyRepeatTests), TUnit_TestProject_AssemblyRepeatTests__TestSource.GetTests, TUnit_TestProject_AssemblyRepeatTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/RepeatTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/RepeatTests.Test.verified.txt index 2435e89113..b29cab31eb 100644 --- a/TUnit.Core.SourceGenerator.Tests/RepeatTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/RepeatTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -230,9 +230,8 @@ internal static class TUnit_TestProject_RepeatTests__TestSource { return new global::TUnit.TestProject.RepeatTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.RepeatTests), TUnit_TestProject_RepeatTests__TestSource.GetTests, TUnit_TestProject_RepeatTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_RepeatTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.RepeatTests), TUnit_TestProject_RepeatTests__TestSource.GetTests, TUnit_TestProject_RepeatTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet10_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet10_0.verified.txt index 7fe922ea2c..416098f41c 100644 --- a/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet10_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet10_0.verified.txt @@ -893,9 +893,8 @@ internal static class TUnit_TestProject_STAThreadTests__TestSource { return new global::TUnit.TestProject.STAThreadTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.STAThreadTests), TUnit_TestProject_STAThreadTests__TestSource.GetTests, TUnit_TestProject_STAThreadTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_STAThreadTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.STAThreadTests), TUnit_TestProject_STAThreadTests__TestSource.GetTests, TUnit_TestProject_STAThreadTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet8_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet8_0.verified.txt index 7fe922ea2c..416098f41c 100644 --- a/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet8_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet8_0.verified.txt @@ -893,9 +893,8 @@ internal static class TUnit_TestProject_STAThreadTests__TestSource { return new global::TUnit.TestProject.STAThreadTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.STAThreadTests), TUnit_TestProject_STAThreadTests__TestSource.GetTests, TUnit_TestProject_STAThreadTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_STAThreadTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.STAThreadTests), TUnit_TestProject_STAThreadTests__TestSource.GetTests, TUnit_TestProject_STAThreadTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet9_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet9_0.verified.txt index 7fe922ea2c..416098f41c 100644 --- a/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet9_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet9_0.verified.txt @@ -893,9 +893,8 @@ internal static class TUnit_TestProject_STAThreadTests__TestSource { return new global::TUnit.TestProject.STAThreadTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.STAThreadTests), TUnit_TestProject_STAThreadTests__TestSource.GetTests, TUnit_TestProject_STAThreadTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_STAThreadTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.STAThreadTests), TUnit_TestProject_STAThreadTests__TestSource.GetTests, TUnit_TestProject_STAThreadTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.Net4_7.verified.txt b/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.Net4_7.verified.txt index da8e3cb4a2..caf281e26d 100644 --- a/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.Net4_7.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.Net4_7.verified.txt @@ -893,9 +893,8 @@ internal static class TUnit_TestProject_STAThreadTests__TestSource { return new global::TUnit.TestProject.STAThreadTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.STAThreadTests), TUnit_TestProject_STAThreadTests__TestSource.GetTests, TUnit_TestProject_STAThreadTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_STAThreadTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.STAThreadTests), TUnit_TestProject_STAThreadTests__TestSource.GetTests, TUnit_TestProject_STAThreadTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/StringArgumentTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/StringArgumentTests.Test.verified.txt index 2c7769106f..51aeeac2d8 100644 --- a/TUnit.Core.SourceGenerator.Tests/StringArgumentTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/StringArgumentTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -228,9 +228,8 @@ internal static class TUnit_TestProject_StringArgumentTests__TestSource { return new global::TUnit.TestProject.StringArgumentTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.StringArgumentTests), TUnit_TestProject_StringArgumentTests__TestSource.GetTests, TUnit_TestProject_StringArgumentTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_StringArgumentTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.StringArgumentTests), TUnit_TestProject_StringArgumentTests__TestSource.GetTests, TUnit_TestProject_StringArgumentTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/Tests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests.Test.verified.txt index 721c9b101d..ddfa8bbc93 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -287,9 +287,8 @@ internal static class TUnit_TestProject_Bugs__1304_Tests__TestSource { return new global::TUnit.TestProject.Bugs._1304.Tests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1304.Tests), TUnit_TestProject_Bugs__1304_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__1304_Tests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_Bugs__1304_Tests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1304.Tests), TUnit_TestProject_Bugs__1304_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__1304_Tests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/Tests1538.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests1538.Test.verified.txt index 315d1d75bb..4add4977d4 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests1538.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests1538.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -320,9 +320,8 @@ internal static class TUnit_TestProject_Bugs__1538_Tests__TestSource { return new global::TUnit.TestProject.Bugs._1538.Tests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1538.Tests), TUnit_TestProject_Bugs__1538_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__1538_Tests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_Bugs__1538_Tests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1538.Tests), TUnit_TestProject_Bugs__1538_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__1538_Tests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/Tests1539.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests1539.Test.verified.txt index 1289b3bc57..d260727669 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests1539.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests1539.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -97,9 +97,8 @@ internal static class TUnit_TestProject_Bugs__1539_Tests__TestSource { return new global::TUnit.TestProject.Bugs._1539.Tests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1539.Tests), TUnit_TestProject_Bugs__1539_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__1539_Tests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_Bugs__1539_Tests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1539.Tests), TUnit_TestProject_Bugs__1539_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__1539_Tests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/Tests1589.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests1589.Test.verified.txt index 307055a127..aa5d9eaf4e 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests1589.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests1589.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -110,9 +110,8 @@ internal static class TUnit_TestProject_Bugs__1589_MyTests__TestSource { return new global::TUnit.TestProject.Bugs._1589.MyTests(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1589.MyTests), TUnit_TestProject_Bugs__1589_MyTests__TestSource.GetTests, TUnit_TestProject_Bugs__1589_MyTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_Bugs__1589_MyTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1589.MyTests), TUnit_TestProject_Bugs__1589_MyTests__TestSource.GetTests, TUnit_TestProject_Bugs__1589_MyTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/Tests1594.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests1594.Test.verified.txt index 13e522ea29..60c5e3c5c3 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests1594.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests1594.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -111,9 +111,8 @@ internal static class TUnit_TestProject_Bugs__1594_MyTests__TestSource { return new global::TUnit.TestProject.Bugs._1594.MyTests(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1594.MyTests), TUnit_TestProject_Bugs__1594_MyTests__TestSource.GetTests, TUnit_TestProject_Bugs__1594_MyTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_Bugs__1594_MyTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1594.MyTests), TUnit_TestProject_Bugs__1594_MyTests__TestSource.GetTests, TUnit_TestProject_Bugs__1594_MyTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/Tests1603.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests1603.Test.verified.txt index 753073a362..077057d282 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests1603.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests1603.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -190,9 +190,8 @@ internal static class TUnit_TestProject_Bugs__1603_Tests__TestSource { return new global::TUnit.TestProject.Bugs._1603.Tests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1603.Tests), TUnit_TestProject_Bugs__1603_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__1603_Tests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_Bugs__1603_Tests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1603.Tests), TUnit_TestProject_Bugs__1603_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__1603_Tests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/Tests1692.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests1692.Test.verified.txt index 68215b5ea7..eedbde0bd7 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests1692.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests1692.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -116,9 +116,8 @@ internal static class TUnit_TestProject_Bugs__1692_Tests__TestSource { return new global::TUnit.TestProject.Bugs._1692.Tests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1692.Tests), TUnit_TestProject_Bugs__1692_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__1692_Tests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_Bugs__1692_Tests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1692.Tests), TUnit_TestProject_Bugs__1692_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__1692_Tests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/Tests1821.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests1821.Test.verified.txt index f482bd30f5..87bb24c8f4 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests1821.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests1821.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -216,9 +216,8 @@ internal static class TUnit_TestProject_Bugs__1821_Tests__TestSource { return new global::TUnit.TestProject.Bugs._1821.Tests(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1821.Tests), TUnit_TestProject_Bugs__1821_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__1821_Tests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_Bugs__1821_Tests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1821.Tests), TUnit_TestProject_Bugs__1821_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__1821_Tests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet10_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet10_0.verified.txt index 34c3894e50..3a24898825 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet10_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet10_0.verified.txt @@ -94,13 +94,9 @@ internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource } } } -internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), new TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), new TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource()); } @@ -216,13 +212,9 @@ internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestS } } } -internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), new TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), new TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestSource()); } @@ -339,11 +331,7 @@ internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestS } } } -internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), new TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), new TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestSource()); } diff --git a/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet8_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet8_0.verified.txt index 34c3894e50..3a24898825 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet8_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet8_0.verified.txt @@ -94,13 +94,9 @@ internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource } } } -internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), new TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), new TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource()); } @@ -216,13 +212,9 @@ internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestS } } } -internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), new TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), new TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestSource()); } @@ -339,11 +331,7 @@ internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestS } } } -internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), new TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), new TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestSource()); } diff --git a/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet9_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet9_0.verified.txt index 34c3894e50..3a24898825 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet9_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet9_0.verified.txt @@ -94,13 +94,9 @@ internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource } } } -internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), new TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), new TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource()); } @@ -216,13 +212,9 @@ internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestS } } } -internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), new TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), new TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestSource()); } @@ -339,11 +331,7 @@ internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestS } } } -internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), new TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), new TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestSource()); } diff --git a/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.Net4_7.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.Net4_7.verified.txt index 4ee68076d9..c580fcd70f 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.Net4_7.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.Net4_7.verified.txt @@ -94,13 +94,9 @@ internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource } } } -internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), new TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), new TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource()); } @@ -216,13 +212,9 @@ internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestS } } } -internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), new TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), new TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestSource()); } @@ -339,11 +331,7 @@ internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestS } } } -internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), new TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1889.DerivedTest), new TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestSource()); } diff --git a/TUnit.Core.SourceGenerator.Tests/Tests1899.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests1899.Test.verified.txt index 6324214948..b4f15ea03e 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests1899.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests1899.Test.verified.txt @@ -94,11 +94,7 @@ internal sealed class TUnit_TestProject_Bugs__1899_DerivedTest_Test1_TestSource } } } -internal static class TUnit_TestProject_Bugs__1899_DerivedTest_Test1_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._1899.DerivedTest), new TUnit_TestProject_Bugs__1899_DerivedTest_Test1_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__1899_DerivedTest_Test1_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._1899.DerivedTest), new TUnit_TestProject_Bugs__1899_DerivedTest_Test1_TestSource()); } diff --git a/TUnit.Core.SourceGenerator.Tests/Tests2083.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests2083.Test.verified.txt index 2f059db8e4..d2cf1f8029 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests2083.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests2083.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -125,9 +125,8 @@ internal static class TUnit_TestProject_Bugs__2083_Tests__TestSource { return new global::TUnit.TestProject.Bugs._2083.Tests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._2083.Tests), TUnit_TestProject_Bugs__2083_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__2083_Tests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_Bugs__2083_Tests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._2083.Tests), TUnit_TestProject_Bugs__2083_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__2083_Tests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/Tests2085.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests2085.Test.verified.txt index 02089f015e..97a2f65584 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests2085.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests2085.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -190,9 +190,8 @@ internal static class TUnit_TestProject_Bugs__2085_Tests__TestSource { return new global::TUnit.TestProject.Bugs._2085.Tests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._2085.Tests), TUnit_TestProject_Bugs__2085_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__2085_Tests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_Bugs__2085_Tests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._2085.Tests), TUnit_TestProject_Bugs__2085_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__2085_Tests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/Tests2112.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests2112.Test.verified.txt index a577765cbb..6a6b944d43 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests2112.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests2112.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -260,9 +260,8 @@ internal static class TUnit_TestProject_Bugs__2112_Tests__TestSource { return new global::TUnit.TestProject.Bugs._2112.Tests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._2112.Tests), TUnit_TestProject_Bugs__2112_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__2112_Tests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_Bugs__2112_Tests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._2112.Tests), TUnit_TestProject_Bugs__2112_Tests__TestSource.GetTests, TUnit_TestProject_Bugs__2112_Tests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/Tests2136.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests2136.Test.verified.txt index 9b00ce27e0..fc239a0fe7 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests2136.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests2136.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -425,11 +425,7 @@ internal sealed class TUnit_TestProject_Bugs__2136_Tests_GenericArgumentsTest__T }; } } -internal static class TUnit_TestProject_Bugs__2136_Tests_GenericArgumentsTest__T_string_ModuleInitializer +internal static partial class TUnit_TestRegistration { - [global::System.Runtime.CompilerServices.ModuleInitializer] - public static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._2136.Tests), new TUnit_TestProject_Bugs__2136_Tests_GenericArgumentsTest__T_string_TestSource()); - } + static readonly int _r_TUnit_TestProject_Bugs__2136_Tests_GenericArgumentsTest__T_string_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._2136.Tests), new TUnit_TestProject_Bugs__2136_Tests_GenericArgumentsTest__T_string_TestSource()); } diff --git a/TUnit.Core.SourceGenerator.Tests/Tests5118.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests5118.Test.verified.txt index f42d711aac..fe32b0b161 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests5118.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests5118.Test.verified.txt @@ -146,9 +146,8 @@ internal static class TUnit_TestProject_Bugs__5118_AsyncClassMethodDataSourceTes { return new global::TUnit.TestProject.Bugs._5118.AsyncClassMethodDataSourceTests(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2])); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.Bugs._5118.AsyncClassMethodDataSourceTests), TUnit_TestProject_Bugs__5118_AsyncClassMethodDataSourceTests__TestSource.GetTests, TUnit_TestProject_Bugs__5118_AsyncClassMethodDataSourceTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_Bugs__5118_AsyncClassMethodDataSourceTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.Bugs._5118.AsyncClassMethodDataSourceTests), TUnit_TestProject_Bugs__5118_AsyncClassMethodDataSourceTests__TestSource.GetTests, TUnit_TestProject_Bugs__5118_AsyncClassMethodDataSourceTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/TimeoutCancellationTokenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/TimeoutCancellationTokenTests.Test.verified.txt index 3b6833c9f2..029097aafd 100644 --- a/TUnit.Core.SourceGenerator.Tests/TimeoutCancellationTokenTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/TimeoutCancellationTokenTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -877,11 +877,10 @@ internal static class TUnit_TestProject_TimeoutCancellationTokenTests__TestSourc { return new global::TUnit.TestProject.TimeoutCancellationTokenTests(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.TimeoutCancellationTokenTests), TUnit_TestProject_TimeoutCancellationTokenTests__TestSource.GetTests, TUnit_TestProject_TimeoutCancellationTokenTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_TimeoutCancellationTokenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.TimeoutCancellationTokenTests), TUnit_TestProject_TimeoutCancellationTokenTests__TestSource.GetTests, TUnit_TestProject_TimeoutCancellationTokenTests__TestSource.EnumerateTestDescriptors); } @@ -1046,11 +1045,10 @@ internal static class TUnit_TestProject_TimeoutDoesNotFireTests__TestSource { return new global::TUnit.TestProject.TimeoutDoesNotFireTests(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.TimeoutDoesNotFireTests), TUnit_TestProject_TimeoutDoesNotFireTests__TestSource.GetTests, TUnit_TestProject_TimeoutDoesNotFireTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_TimeoutDoesNotFireTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.TimeoutDoesNotFireTests), TUnit_TestProject_TimeoutDoesNotFireTests__TestSource.GetTests, TUnit_TestProject_TimeoutDoesNotFireTests__TestSource.EnumerateTestDescriptors); } @@ -1215,9 +1213,8 @@ internal static class TUnit_TestProject_CancellationTokenTriggeredTests__TestSou { return new global::TUnit.TestProject.CancellationTokenTriggeredTests(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.CancellationTokenTriggeredTests), TUnit_TestProject_CancellationTokenTriggeredTests__TestSource.GetTests, TUnit_TestProject_CancellationTokenTriggeredTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_CancellationTokenTriggeredTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.CancellationTokenTriggeredTests), TUnit_TestProject_CancellationTokenTriggeredTests__TestSource.GetTests, TUnit_TestProject_CancellationTokenTriggeredTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/TupleDataSourceDrivenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/TupleDataSourceDrivenTests.Test.verified.txt index 30f03aea00..046b1445d0 100644 --- a/TUnit.Core.SourceGenerator.Tests/TupleDataSourceDrivenTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/TupleDataSourceDrivenTests.Test.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -141,9 +141,8 @@ internal static class TUnit_TestProject_TupleDataSourceDrivenTests__TestSource { return new global::TUnit.TestProject.TupleDataSourceDrivenTests(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.TupleDataSourceDrivenTests), TUnit_TestProject_TupleDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_TupleDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_TupleDataSourceDrivenTests__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.TupleDataSourceDrivenTests), TUnit_TestProject_TupleDataSourceDrivenTests__TestSource.GetTests, TUnit_TestProject_TupleDataSourceDrivenTests__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_AotSafeDataSourceFactories.verified.txt b/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_AotSafeDataSourceFactories.verified.txt index 5e1232a450..d5915a94e7 100644 --- a/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_AotSafeDataSourceFactories.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_AotSafeDataSourceFactories.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -120,9 +120,8 @@ internal static class TUnit_TestProject_AotDataSourceTest__TestSource { return new global::TUnit.TestProject.AotDataSourceTest(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.AotDataSourceTest), TUnit_TestProject_AotDataSourceTest__TestSource.GetTests, TUnit_TestProject_AotDataSourceTest__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_AotDataSourceTest__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.AotDataSourceTest), TUnit_TestProject_AotDataSourceTest__TestSource.GetTests, TUnit_TestProject_AotDataSourceTest__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_ConfigurationSupport.verified.txt b/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_ConfigurationSupport.verified.txt index 33a20caf6c..c4a558c435 100644 --- a/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_ConfigurationSupport.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_ConfigurationSupport.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -92,9 +92,8 @@ internal static class TUnit_TestProject_ConfigurationTest__TestSource { return new global::TUnit.TestProject.ConfigurationTest(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.ConfigurationTest), TUnit_TestProject_ConfigurationTest__TestSource.GetTests, TUnit_TestProject_ConfigurationTest__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_ConfigurationTest__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.ConfigurationTest), TUnit_TestProject_ConfigurationTest__TestSource.GetTests, TUnit_TestProject_ConfigurationTest__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_ModuleInitializer_Generation.verified.txt b/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_ModuleInitializer_Generation.verified.txt index 6104e5c120..e78ca37cd1 100644 --- a/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_ModuleInitializer_Generation.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_ModuleInitializer_Generation.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -92,9 +92,8 @@ internal static class TUnit_TestProject_ModuleInitializerTest__TestSource { return new global::TUnit.TestProject.ModuleInitializerTest(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.ModuleInitializerTest), TUnit_TestProject_ModuleInitializerTest__TestSource.GetTests, TUnit_TestProject_ModuleInitializerTest__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_ModuleInitializerTest__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.ModuleInitializerTest), TUnit_TestProject_ModuleInitializerTest__TestSource.GetTests, TUnit_TestProject_ModuleInitializerTest__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_StronglyTypedDelegates_Generation.verified.txt b/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_StronglyTypedDelegates_Generation.verified.txt index 8c5125e2f7..30413c9c07 100644 --- a/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_StronglyTypedDelegates_Generation.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_StronglyTypedDelegates_Generation.verified.txt @@ -1,4 +1,4 @@ -// +// #pragma warning disable #nullable enable @@ -92,9 +92,8 @@ internal static class TUnit_TestProject_TypedDelegateTest__TestSource { return new global::TUnit.TestProject.TypedDelegateTest(); } - [global::System.Runtime.CompilerServices.ModuleInitializer] - internal static void Initialize() - { - global::TUnit.Core.SourceRegistrar.Register(typeof(global::TUnit.TestProject.TypedDelegateTest), TUnit_TestProject_TypedDelegateTest__TestSource.GetTests, TUnit_TestProject_TypedDelegateTest__TestSource.EnumerateTestDescriptors); - } +} +internal static partial class TUnit_TestRegistration +{ + static readonly int _r_TUnit_TestProject_TypedDelegateTest__TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.TypedDelegateTest), TUnit_TestProject_TypedDelegateTest__TestSource.GetTests, TUnit_TestProject_TypedDelegateTest__TestSource.EnumerateTestDescriptors); } diff --git a/TUnit.Core.SourceGenerator/CodeGenerators/InfrastructureGenerator.cs b/TUnit.Core.SourceGenerator/CodeGenerators/InfrastructureGenerator.cs index 1810bb336d..aaf2f37faf 100644 --- a/TUnit.Core.SourceGenerator/CodeGenerators/InfrastructureGenerator.cs +++ b/TUnit.Core.SourceGenerator/CodeGenerators/InfrastructureGenerator.cs @@ -447,6 +447,16 @@ private static void GenerateCode(SourceProductionContext context, AssemblyInfoMo } sourceBuilder.AppendLine(); + + // Trigger consolidated registration .cctors. + // Per-class/per-method test sources and per-hook sources contribute static field + // initializers to shared partial classes. RunClassConstructor forces each .cctor + // to execute, performing all registrations in ONE JIT-compiled method per class. + // No try/catch needed — InfrastructureGenerator always emits both shell classes. + sourceBuilder.AppendLine("global::System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(typeof(global::TUnit.Generated.TUnit_TestRegistration).TypeHandle);"); + sourceBuilder.AppendLine("global::System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(typeof(global::TUnit.Generated.TUnit_HookRegistration).TypeHandle);"); + sourceBuilder.AppendLine(); + sourceBuilder.AppendLine("try"); sourceBuilder.AppendLine("{"); sourceBuilder.Indent(); @@ -457,6 +467,21 @@ private static void GenerateCode(SourceProductionContext context, AssemblyInfoMo } } + // Empty partial class shell in TUnit.Generated namespace — per-class and per-method + // test source files contribute static field initializers to this class. + // The compiler merges all contributions into a single .cctor, + // which is triggered by RunClassConstructor above. + sourceBuilder.AppendLine(); + sourceBuilder.AppendLine("namespace TUnit.Generated"); + sourceBuilder.AppendLine("{"); + sourceBuilder.Indent(); + sourceBuilder.AppendLine("[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute]"); + sourceBuilder.AppendLine("internal static partial class TUnit_TestRegistration { }"); + sourceBuilder.AppendLine("[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute]"); + sourceBuilder.AppendLine("internal static partial class TUnit_HookRegistration { }"); + sourceBuilder.Unindent(); + sourceBuilder.AppendLine("}"); + context.AddSource("TUnitInfrastructure.g.cs", sourceBuilder.ToString()); } } diff --git a/TUnit.Core.SourceGenerator/Generators/HookMetadataGenerator.cs b/TUnit.Core.SourceGenerator/Generators/HookMetadataGenerator.cs index 5528bc2561..d090889852 100644 --- a/TUnit.Core.SourceGenerator/Generators/HookMetadataGenerator.cs +++ b/TUnit.Core.SourceGenerator/Generators/HookMetadataGenerator.cs @@ -379,21 +379,32 @@ private static void GenerateIndividualHookFile(SourceProductionContext context, writer.AppendLine("using HookType = global::TUnit.Core.HookType;"); writer.AppendLine(); - writer.AppendLine($"namespace TUnit.Generated.Hooks.{safeFileName};"); - writer.AppendLine(); + // Hook delegate body — kept in its own namespace to avoid name collisions. + writer.AppendLine($"namespace TUnit.Generated.Hooks.{safeFileName}"); + writer.AppendLine("{"); + writer.Indent(); using (writer.BeginBlock($"internal static class {safeFileName}Initializer")) { - writer.AppendLine("[global::System.Runtime.CompilerServices.ModuleInitializer]"); - using (writer.BeginBlock("public static void Initialize()")) - { - GenerateHookRegistration(writer, hook); - } - - writer.AppendLine(); GenerateHookDelegate(writer, hook); } + writer.Unindent(); + writer.AppendLine("}"); + + // Partial class field — registration is a single expression, so the .cctor contains + // no per-hook method calls. All hook registrations compile into ONE JIT'd method. + writer.AppendLine(); + writer.AppendLine("namespace TUnit.Generated"); + writer.AppendLine("{"); + writer.AppendLine(" internal static partial class TUnit_HookRegistration"); + writer.AppendLine(" {"); + writer.Append($" static readonly int _h_{safeFileName} = "); + GenerateInlineHookRegistration(writer, hook, safeFileName); + writer.AppendLine(";"); + writer.AppendLine(" }"); + writer.AppendLine("}"); + context.AddSource($"{safeFileName}.Hook.g.cs", writer.ToString()); } @@ -446,176 +457,57 @@ private static string GetSimpleTypeName(string fullyQualifiedTypeName) return lastDot >= 0 ? typeName.Substring(lastDot + 1) : typeName; } - private static void GenerateHookRegistration(CodeWriter writer, HookModel hook) + /// + /// Emits a single SourceRegistrar.RegisterHook(...) expression for use as a field initializer. + /// The hook object is constructed inline, so no per-hook method needs JIT. + /// + private static void GenerateInlineHookRegistration(CodeWriter writer, HookModel hook, string safeFileName) { var typeDisplay = hook.FullyQualifiedTypeName; var isInstance = hook.HookKind is "Before" or "After" && hook.HookType == "Test"; + var delegatePrefix = $"global::TUnit.Generated.Hooks.{safeFileName}.{safeFileName}Initializer."; - if (hook.HookType == "Test") - { - if (hook.HookKind == "Before") - { - if (isInstance) - { - GenerateInstanceHookRegistration(writer, "BeforeTestHooks", typeDisplay, hook); - } - else - { - GenerateGlobalHookRegistration(writer, "BeforeEveryTestHooks", hook); - } - } - else if (hook.HookKind == "After") - { - if (isInstance) - { - GenerateInstanceHookRegistration(writer, "AfterTestHooks", typeDisplay, hook); - } - else - { - GenerateGlobalHookRegistration(writer, "AfterEveryTestHooks", hook); - } - } - else if (hook.HookKind == "BeforeEvery") - { - GenerateGlobalHookRegistration(writer, "BeforeEveryTestHooks", hook); - } - else if (hook.HookKind == "AfterEvery") - { - GenerateGlobalHookRegistration(writer, "AfterEveryTestHooks", hook); - } - } - else if (hook.HookType == "Class") - { - if (hook.HookKind == "Before") - { - GenerateTypeHookRegistration(writer, "BeforeClassHooks", typeDisplay, hook); - } - else if (hook.HookKind == "After") - { - GenerateTypeHookRegistration(writer, "AfterClassHooks", typeDisplay, hook); - } - else if (hook.HookKind == "BeforeEvery") - { - GenerateGlobalHookRegistration(writer, "BeforeEveryClassHooks", hook); - } - else if (hook.HookKind == "AfterEvery") - { - GenerateGlobalHookRegistration(writer, "AfterEveryClassHooks", hook); - } - } - else if (hook.HookType == "Assembly") - { - var assemblyName = hook.AssemblyName.Replace(".", "_").Replace("-", "_"); - writer.AppendLine($"var {assemblyName}_assembly = typeof({typeDisplay}).Assembly;"); + // Determine collection name and key expression + var (collectionName, keyExpr) = GetHookCollectionAndKey(hook, typeDisplay, isInstance); - if (hook.HookKind == "Before") - { - GenerateAssemblyHookRegistration(writer, "BeforeAssemblyHooks", assemblyName, hook); - } - else if (hook.HookKind == "After") - { - GenerateAssemblyHookRegistration(writer, "AfterAssemblyHooks", assemblyName, hook); - } - else if (hook.HookKind == "BeforeEvery") - { - GenerateGlobalHookRegistration(writer, "BeforeEveryAssemblyHooks", hook); - } - else if (hook.HookKind == "AfterEvery") - { - GenerateGlobalHookRegistration(writer, "AfterEveryAssemblyHooks", hook); - } - } - else if (hook.HookType == "TestSession") + if (keyExpr != null) { - if (hook.HookKind is "Before" or "BeforeEvery") - { - GenerateGlobalHookRegistration(writer, "BeforeTestSessionHooks", hook); - } - else if (hook.HookKind is "After" or "AfterEvery") - { - GenerateGlobalHookRegistration(writer, "AfterTestSessionHooks", hook); - } + writer.AppendLine($"global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.{collectionName}, {keyExpr},"); } - else if (hook.HookType == "TestDiscovery") + else { - if (hook.HookKind is "Before" or "BeforeEvery") - { - GenerateGlobalHookRegistration(writer, "BeforeTestDiscoveryHooks", hook); - } - else if (hook.HookKind is "After" or "AfterEvery") - { - GenerateGlobalHookRegistration(writer, "AfterTestDiscoveryHooks", hook); - } + writer.AppendLine($"global::TUnit.Core.SourceRegistrar.RegisterHook(global::TUnit.Core.Sources.{collectionName},"); } - } - - private static void GenerateInstanceHookRegistration(CodeWriter writer, string dictionaryName, string typeDisplay, HookModel hook) - { - var hookType = GetConcreteHookType(dictionaryName, true); - writer.AppendLine($"global::TUnit.Core.Sources.{dictionaryName}.GetOrAdd(typeof({typeDisplay}), static _ => new global::System.Collections.Concurrent.ConcurrentBag());"); - writer.AppendLine($"global::TUnit.Core.Sources.{dictionaryName}[typeof({typeDisplay})].Add("); - writer.Indent(); - GenerateHookObject(writer, hook, true); - writer.Unindent(); - writer.AppendLine(");"); - } - - private static void GenerateTypeHookRegistration(CodeWriter writer, string dictionaryName, string typeDisplay, HookModel hook) - { - var hookType = GetConcreteHookType(dictionaryName, false); - writer.AppendLine($"global::TUnit.Core.Sources.{dictionaryName}.GetOrAdd(typeof({typeDisplay}), static _ => new global::System.Collections.Concurrent.ConcurrentBag());"); - writer.AppendLine($"global::TUnit.Core.Sources.{dictionaryName}[typeof({typeDisplay})].Add("); - writer.Indent(); - GenerateHookObject(writer, hook, false); - writer.Unindent(); - writer.AppendLine(");"); - } - - private static void GenerateAssemblyHookRegistration(CodeWriter writer, string dictionaryName, string assemblyVarName, HookModel hook) - { - var assemblyVar = assemblyVarName + "_assembly"; - var hookType = GetConcreteHookType(dictionaryName, false); - writer.AppendLine($"global::TUnit.Core.Sources.{dictionaryName}.GetOrAdd({assemblyVar}, static _ => new global::System.Collections.Concurrent.ConcurrentBag());"); - writer.AppendLine($"global::TUnit.Core.Sources.{dictionaryName}[{assemblyVar}].Add("); - writer.Indent(); - GenerateHookObject(writer, hook, false); - writer.Unindent(); - writer.AppendLine(");"); - } - private static void GenerateGlobalHookRegistration(CodeWriter writer, string listName, HookModel hook) - { - writer.AppendLine($"global::TUnit.Core.Sources.{listName}.Add("); writer.Indent(); - GenerateHookObject(writer, hook, false); + GenerateHookObject(writer, hook, isInstance, delegatePrefix); writer.Unindent(); - writer.AppendLine(");"); + writer.Append(")"); } - private static string GetConcreteHookType(string dictionaryName, bool isInstance) + private static (string collectionName, string? keyExpr) GetHookCollectionAndKey(HookModel hook, string typeDisplay, bool isInstance) { - if (isInstance) - { - return "InstanceHookMethod"; - } - - return dictionaryName switch - { - "BeforeClassHooks" => "BeforeClassHookMethod", - "AfterClassHooks" => "AfterClassHookMethod", - "BeforeAssemblyHooks" => "BeforeAssemblyHookMethod", - "AfterAssemblyHooks" => "AfterAssemblyHookMethod", - "BeforeTestSessionHooks" => "BeforeTestSessionHookMethod", - "AfterTestSessionHooks" => "AfterTestSessionHookMethod", - "BeforeTestDiscoveryHooks" => "BeforeTestDiscoveryHookMethod", - "AfterTestDiscoveryHooks" => "AfterTestDiscoveryHookMethod", - "BeforeEveryTestHooks" => "BeforeTestHookMethod", - "AfterEveryTestHooks" => "AfterTestHookMethod", - "BeforeEveryClassHooks" => "BeforeClassHookMethod", - "AfterEveryClassHooks" => "AfterClassHookMethod", - "BeforeEveryAssemblyHooks" => "BeforeAssemblyHookMethod", - "AfterEveryAssemblyHooks" => "AfterAssemblyHookMethod", - _ => throw new ArgumentException($"Unknown dictionary name: {dictionaryName}") + return (hook.HookType, hook.HookKind, isInstance) switch + { + ("Test", "Before", true) => ("BeforeTestHooks", $"typeof({typeDisplay})"), + ("Test", "After", true) => ("AfterTestHooks", $"typeof({typeDisplay})"), + ("Test", "Before", false) => ("BeforeEveryTestHooks", null), + ("Test", "After", false) => ("AfterEveryTestHooks", null), + ("Test", "BeforeEvery", _) => ("BeforeEveryTestHooks", null), + ("Test", "AfterEvery", _) => ("AfterEveryTestHooks", null), + ("Class", "Before", _) => ("BeforeClassHooks", $"typeof({typeDisplay})"), + ("Class", "After", _) => ("AfterClassHooks", $"typeof({typeDisplay})"), + ("Class", "BeforeEvery", _) => ("BeforeEveryClassHooks", null), + ("Class", "AfterEvery", _) => ("AfterEveryClassHooks", null), + ("Assembly", "Before", _) => ("BeforeAssemblyHooks", $"typeof({typeDisplay}).Assembly"), + ("Assembly", "After", _) => ("AfterAssemblyHooks", $"typeof({typeDisplay}).Assembly"), + ("Assembly", "BeforeEvery", _) => ("BeforeEveryAssemblyHooks", null), + ("Assembly", "AfterEvery", _) => ("AfterEveryAssemblyHooks", null), + ("TestSession", "Before" or "BeforeEvery", _) => ("BeforeTestSessionHooks", null), + ("TestSession", "After" or "AfterEvery", _) => ("AfterTestSessionHooks", null), + ("TestDiscovery", "Before" or "BeforeEvery", _) => ("BeforeTestDiscoveryHooks", null), + ("TestDiscovery", "After" or "AfterEvery", _) => ("AfterTestDiscoveryHooks", null), + _ => throw new ArgumentException($"Unknown hook: {hook.HookType}/{hook.HookKind}") }; } @@ -627,7 +519,7 @@ private static void GenerateHookDelegate(CodeWriter writer, HookModel hook) if (isInstanceHook) { - using (writer.BeginBlock($"private static async ValueTask {delegateKey}_Body(object instance, {contextType} context, CancellationToken cancellationToken)")) + using (writer.BeginBlock($"internal static async ValueTask {delegateKey}_Body(object instance, {contextType} context, CancellationToken cancellationToken)")) { if (hook.ClassIsOpenGeneric) { @@ -641,7 +533,7 @@ private static void GenerateHookDelegate(CodeWriter writer, HookModel hook) } else { - using (writer.BeginBlock($"private static async ValueTask {delegateKey}_Body({contextType} context, CancellationToken cancellationToken)")) + using (writer.BeginBlock($"internal static async ValueTask {delegateKey}_Body({contextType} context, CancellationToken cancellationToken)")) { if (hook is { ClassIsOpenGeneric: true, IsStatic: true }) { @@ -801,10 +693,11 @@ private static void GenerateStaticMethodInvocation(CodeWriter writer, HookModel writer.AppendLine($"await AsyncConvert.Convert(() => {methodCall});"); } - private static void GenerateHookObject(CodeWriter writer, HookModel hook, bool isInstance) + private static void GenerateHookObject(CodeWriter writer, HookModel hook, bool isInstance, string delegatePrefix) { var hookClass = GetHookClass(hook.HookType, hook.HookKind, !isInstance); var delegateKey = GetDelegateKey(hook); + var bodyRef = $"{delegatePrefix}{delegateKey}_Body"; writer.AppendLine($"new {hookClass}"); writer.AppendLine("{"); @@ -823,7 +716,7 @@ private static void GenerateHookObject(CodeWriter writer, HookModel hook, bool i writer.AppendLine($"HookExecutor = {HookExecutorHelper.GetHookExecutor(hook.HookExecutorTypeName)},"); writer.AppendLine($"Order = {hook.Order},"); writer.AppendLine($"RegistrationIndex = global::TUnit.Core.HookRegistrationIndices.GetNext{GetHookIndexMethodName(hook)},"); - writer.AppendLine($"Body = {delegateKey}_Body" + (isInstance ? "" : ",")); + writer.AppendLine($"Body = {bodyRef}" + (isInstance ? "" : ",")); if (!isInstance) { diff --git a/TUnit.Core.SourceGenerator/Generators/TestMetadataGenerator.cs b/TUnit.Core.SourceGenerator/Generators/TestMetadataGenerator.cs index 610b96e47b..bc0c55b22a 100644 --- a/TUnit.Core.SourceGenerator/Generators/TestMetadataGenerator.cs +++ b/TUnit.Core.SourceGenerator/Generators/TestMetadataGenerator.cs @@ -450,7 +450,7 @@ private static void GenerateTestMetadata(CodeWriter writer, TestMethodMetadata t if (!useClassHelper) { - GenerateModuleInitializer(writer, testMethod, uniqueClassName); + GenerateTestRegistrationField(writer, testMethod, uniqueClassName); } } @@ -2404,19 +2404,23 @@ private static string EscapeString(string value) .Replace("\t", "\\t"); } - private static void GenerateModuleInitializer(CodeWriter writer, TestMethodMetadata testMethod, string uniqueClassName) + private static void GenerateTestRegistrationField(CodeWriter writer, TestMethodMetadata testMethod, string uniqueClassName) + { + EmitRegistrationField(writer, uniqueClassName, + $"global::TUnit.Core.SourceRegistrar.RegisterReturn({GenerateTypeReference(testMethod.TypeSymbol, testMethod.IsGenericType)}, new {uniqueClassName}())"); + } + + /// + /// Emits a static field on the shared TUnit_TestRegistration partial class. + /// All contributions merge into a single .cctor, reducing JIT overhead from O(N) methods to O(1). + /// + private static void EmitRegistrationField(CodeWriter writer, string fieldName, string registrarCall) { writer.AppendLine(); - writer.AppendLine($"internal static class {uniqueClassName.Replace("_TestSource", "_ModuleInitializer")}"); - writer.AppendLine("{"); - writer.Indent(); - writer.AppendLine("[global::System.Runtime.CompilerServices.ModuleInitializer]"); - writer.AppendLine("public static void Initialize()"); + writer.AppendLine("internal static partial class TUnit_TestRegistration"); writer.AppendLine("{"); writer.Indent(); - writer.AppendLine($"global::TUnit.Core.SourceRegistrar.Register({GenerateTypeReference(testMethod.TypeSymbol, testMethod.IsGenericType)}, new {uniqueClassName}());"); - writer.Unindent(); - writer.AppendLine("}"); + writer.AppendLine($"static readonly int _r_{fieldName} = {registrarCall};"); writer.Unindent(); writer.AppendLine("}"); } @@ -3023,17 +3027,11 @@ private static void GeneratePerClassTestSource(SourceProductionContext context, writer.Unindent(); writer.AppendLine("}"); - // ModuleInitializer — registers via delegates (no .ctor allocation) - writer.AppendLine("[global::System.Runtime.CompilerServices.ModuleInitializer]"); - writer.AppendLine("internal static void Initialize()"); - writer.AppendLine("{"); - writer.Indent(); - writer.AppendLine($"global::TUnit.Core.SourceRegistrar.Register(typeof({classGroup.ClassFullyQualified}), {classGroup.TestSourceName}.GetTests, {classGroup.TestSourceName}.EnumerateTestDescriptors);"); writer.Unindent(); writer.AppendLine("}"); - writer.Unindent(); - writer.AppendLine("}"); + EmitRegistrationField(writer, classGroup.TestSourceName, + $"global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof({classGroup.ClassFullyQualified}), {classGroup.TestSourceName}.GetTests, {classGroup.TestSourceName}.EnumerateTestDescriptors)"); context.AddSource($"{classGroup.TestSourceName}.g.cs", SourceText.From(writer.ToString(), Encoding.UTF8)); } diff --git a/TUnit.Core/SourceRegistrar.cs b/TUnit.Core/SourceRegistrar.cs index 6e110c663a..ba6b38d159 100644 --- a/TUnit.Core/SourceRegistrar.cs +++ b/TUnit.Core/SourceRegistrar.cs @@ -96,4 +96,52 @@ public static void RegisterProperty(IPropertySource propertySource) { Sources.PropertySources.Enqueue(propertySource); } + + /// + /// Registers a hook into a type-keyed dictionary and returns a dummy value for use as a field initializer. + /// + public static int RegisterHook(ConcurrentDictionary> dictionary, Type key, T hook) + { + dictionary.GetOrAdd(key, static _ => new ConcurrentBag()).Add(hook); + return 0; + } + + /// + /// Registers a hook into an assembly-keyed dictionary and returns a dummy value for use as a field initializer. + /// + public static int RegisterHook(ConcurrentDictionary> dictionary, Assembly key, T hook) + { + dictionary.GetOrAdd(key, static _ => new ConcurrentBag()).Add(hook); + return 0; + } + + /// + /// Registers a hook into a global bag and returns a dummy value for use as a field initializer. + /// + public static int RegisterHook(ConcurrentBag bag, T hook) + { + bag.Add(hook); + return 0; + } + + /// + /// Wrapper around that returns a dummy value for use as a field initializer. + /// + public static int RegisterReturn(Type testClassType, ITestSource testSource) + { + Register(testClassType, testSource); + return 0; + } + + /// + /// Wrapper around that returns a dummy value for use as a field initializer. + /// + public static int RegisterReturn( + Type testClassType, + Func> getTests, + Func> enumerateDescriptors) + { + Register(testClassType, getTests, enumerateDescriptors); + return 0; + } } diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_100.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_100.cs deleted file mode 100644 index 0945b1b088..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_100.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_100 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_11.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_11.cs deleted file mode 100644 index 854cbe4557..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_11.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_11 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_12.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_12.cs deleted file mode 100644 index 4b8964f188..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_12.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_12 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_13.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_13.cs deleted file mode 100644 index d1bdcc05af..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_13.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_13 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_14.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_14.cs deleted file mode 100644 index 85753eba28..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_14.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_14 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_15.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_15.cs deleted file mode 100644 index c01c48ea2d..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_15.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_15 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_16.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_16.cs deleted file mode 100644 index 8ba1e4f8ea..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_16.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_16 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_17.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_17.cs deleted file mode 100644 index 888365c87b..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_17.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_17 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_18.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_18.cs deleted file mode 100644 index 3aad541970..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_18.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_18 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_19.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_19.cs deleted file mode 100644 index ad6c3bcfb9..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_19.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_19 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_20.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_20.cs deleted file mode 100644 index efa9f6d33a..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_20.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_20 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_21.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_21.cs deleted file mode 100644 index 895b6e4a9f..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_21.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_21 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_22.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_22.cs deleted file mode 100644 index 50e95b2d77..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_22.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_22 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_23.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_23.cs deleted file mode 100644 index 02928b1e89..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_23.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_23 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_24.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_24.cs deleted file mode 100644 index 004b906453..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_24.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_24 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_25.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_25.cs deleted file mode 100644 index e92b2884b5..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_25.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_25 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_26.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_26.cs deleted file mode 100644 index fca1e19d4f..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_26.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_26 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_27.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_27.cs deleted file mode 100644 index d907d9a1b8..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_27.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_27 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_28.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_28.cs deleted file mode 100644 index 5cf2ee4fee..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_28.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_28 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_29.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_29.cs deleted file mode 100644 index f1c46bab93..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_29.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_29 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_30.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_30.cs deleted file mode 100644 index fb1d050ad7..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_30.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_30 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_31.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_31.cs deleted file mode 100644 index 3ae082621a..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_31.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_31 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_32.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_32.cs deleted file mode 100644 index 02861d0041..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_32.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_32 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_33.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_33.cs deleted file mode 100644 index db6ae49202..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_33.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_33 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_34.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_34.cs deleted file mode 100644 index 6eb7a9936f..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_34.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_34 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_35.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_35.cs deleted file mode 100644 index 94dbd66710..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_35.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_35 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_36.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_36.cs deleted file mode 100644 index 4d2f88c133..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_36.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_36 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_37.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_37.cs deleted file mode 100644 index 7a2ad904e1..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_37.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_37 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_38.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_38.cs deleted file mode 100644 index 93875bbf12..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_38.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_38 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_39.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_39.cs deleted file mode 100644 index 814604fe6d..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_39.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_39 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_40.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_40.cs deleted file mode 100644 index cc2770f7dc..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_40.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_40 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_41.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_41.cs deleted file mode 100644 index fe22bfd9a3..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_41.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_41 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_42.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_42.cs deleted file mode 100644 index b5db613731..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_42.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_42 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_43.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_43.cs deleted file mode 100644 index 8600f2a524..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_43.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_43 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_44.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_44.cs deleted file mode 100644 index 4a43ce105d..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_44.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_44 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_45.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_45.cs deleted file mode 100644 index 5bae9381c5..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_45.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_45 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_46.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_46.cs deleted file mode 100644 index cb1c8df1a2..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_46.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_46 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_47.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_47.cs deleted file mode 100644 index b382ce814c..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_47.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_47 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_48.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_48.cs deleted file mode 100644 index ddecaa76e0..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_48.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_48 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_49.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_49.cs deleted file mode 100644 index 493889c15b..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_49.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_49 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_50.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_50.cs deleted file mode 100644 index 3bc0a91342..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_50.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_50 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_51.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_51.cs deleted file mode 100644 index 523734e237..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_51.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_51 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_52.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_52.cs deleted file mode 100644 index 7aff7870f6..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_52.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_52 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_53.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_53.cs deleted file mode 100644 index a8d40a4474..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_53.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_53 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_54.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_54.cs deleted file mode 100644 index b3cfed3d29..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_54.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_54 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_55.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_55.cs deleted file mode 100644 index e2dcca2611..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_55.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_55 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_56.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_56.cs deleted file mode 100644 index 8c3e296bb5..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_56.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_56 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_57.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_57.cs deleted file mode 100644 index 20ceeb8cbd..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_57.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_57 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_58.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_58.cs deleted file mode 100644 index 71cafcf06e..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_58.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_58 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_59.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_59.cs deleted file mode 100644 index e2ad06d156..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_59.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_59 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_60.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_60.cs deleted file mode 100644 index 8fa31c1e74..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_60.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_60 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_61.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_61.cs deleted file mode 100644 index 8750adaff8..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_61.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_61 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_62.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_62.cs deleted file mode 100644 index 8b1e131241..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_62.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_62 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_63.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_63.cs deleted file mode 100644 index d1200ee8b4..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_63.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_63 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_64.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_64.cs deleted file mode 100644 index 8bde987419..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_64.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_64 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_65.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_65.cs deleted file mode 100644 index 0d27ea4603..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_65.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_65 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_66.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_66.cs deleted file mode 100644 index 19e11bd015..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_66.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_66 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_67.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_67.cs deleted file mode 100644 index 9ef93fb6ee..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_67.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_67 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_68.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_68.cs deleted file mode 100644 index a3fadf0b3c..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_68.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_68 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_69.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_69.cs deleted file mode 100644 index c27da7a16a..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_69.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_69 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_70.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_70.cs deleted file mode 100644 index f9389eb22f..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_70.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_70 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_71.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_71.cs deleted file mode 100644 index bb96ff40db..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_71.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_71 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_72.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_72.cs deleted file mode 100644 index 0955e87a65..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_72.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_72 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_73.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_73.cs deleted file mode 100644 index fbf14a1c12..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_73.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_73 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_74.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_74.cs deleted file mode 100644 index b0737cf422..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_74.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_74 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_75.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_75.cs deleted file mode 100644 index f4714bfe3e..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_75.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_75 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_76.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_76.cs deleted file mode 100644 index 6ddc426332..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_76.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_76 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_77.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_77.cs deleted file mode 100644 index 7edfe230c6..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_77.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_77 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_78.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_78.cs deleted file mode 100644 index ec5defa035..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_78.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_78 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_79.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_79.cs deleted file mode 100644 index bebc27ddc2..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_79.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_79 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_80.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_80.cs deleted file mode 100644 index 743b2dc940..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_80.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_80 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_81.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_81.cs deleted file mode 100644 index 0113682de2..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_81.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_81 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_82.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_82.cs deleted file mode 100644 index 2a9d6e4545..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_82.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_82 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_83.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_83.cs deleted file mode 100644 index 8eff28cac1..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_83.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_83 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_84.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_84.cs deleted file mode 100644 index 01c932e094..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_84.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_84 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_85.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_85.cs deleted file mode 100644 index 9eaaef31ec..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_85.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_85 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_86.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_86.cs deleted file mode 100644 index 6219ddf351..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_86.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_86 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_87.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_87.cs deleted file mode 100644 index aca35c6db7..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_87.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_87 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_88.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_88.cs deleted file mode 100644 index 05dda1b612..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_88.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_88 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_89.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_89.cs deleted file mode 100644 index 63396c299c..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_89.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_89 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_90.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_90.cs deleted file mode 100644 index 07ee2f0419..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_90.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_90 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_91.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_91.cs deleted file mode 100644 index 56f340e34f..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_91.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_91 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_92.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_92.cs deleted file mode 100644 index 6529edd209..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_92.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_92 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_93.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_93.cs deleted file mode 100644 index b9c25ec171..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_93.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_93 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_94.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_94.cs deleted file mode 100644 index 071b1fc5d1..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_94.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_94 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_95.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_95.cs deleted file mode 100644 index 0070ce45fd..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_95.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_95 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_96.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_96.cs deleted file mode 100644 index b2c54ad3c4..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_96.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_96 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_97.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_97.cs deleted file mode 100644 index 09407e1594..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_97.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_97 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_98.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_98.cs deleted file mode 100644 index c1c30a4d1d..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_98.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_98 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_99.cs b/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_99.cs deleted file mode 100644 index d7f5c49cac..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/DataDriven/DataDrivenTests_99.cs +++ /dev/null @@ -1,22 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.DataDriven; - -public class DataDrivenTests_99 -{ - public static IEnumerable<(int, string)> TestData() - { - for (int i = 0; i < 10; i++) - yield return (i, "Value" + i); - } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_01((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_02((int num, string str) data) { _ = data.num + data.str.Length; } - - [Test] - [MethodDataSource(nameof(TestData))] - public void DataTest_03((int num, string str) data) { _ = data.num + data.str.Length; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_100.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_100.cs deleted file mode 100644 index 0111b33b01..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_100.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_100 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_11.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_11.cs deleted file mode 100644 index b306a6dc17..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_11.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_11 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_12.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_12.cs deleted file mode 100644 index a46047258c..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_12.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_12 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_13.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_13.cs deleted file mode 100644 index 8560e8957f..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_13.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_13 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_14.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_14.cs deleted file mode 100644 index 3328d63651..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_14.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_14 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_15.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_15.cs deleted file mode 100644 index 52c7797360..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_15.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_15 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_16.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_16.cs deleted file mode 100644 index a26c50c8ae..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_16.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_16 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_17.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_17.cs deleted file mode 100644 index 8a0a811196..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_17.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_17 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_18.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_18.cs deleted file mode 100644 index c2a5215310..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_18.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_18 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_19.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_19.cs deleted file mode 100644 index 6adffd381e..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_19.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_19 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_20.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_20.cs deleted file mode 100644 index 0ca55e5b9a..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_20.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_20 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_21.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_21.cs deleted file mode 100644 index 7a1d138a52..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_21.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_21 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_22.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_22.cs deleted file mode 100644 index 1093487c78..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_22.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_22 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_23.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_23.cs deleted file mode 100644 index a932c6be8d..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_23.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_23 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_24.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_24.cs deleted file mode 100644 index e9950bd3da..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_24.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_24 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_25.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_25.cs deleted file mode 100644 index 9795c055c8..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_25.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_25 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_26.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_26.cs deleted file mode 100644 index a6cc9f4b60..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_26.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_26 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_27.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_27.cs deleted file mode 100644 index 3e8edc42a3..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_27.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_27 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_28.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_28.cs deleted file mode 100644 index e080dd2fba..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_28.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_28 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_29.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_29.cs deleted file mode 100644 index 466c8cfed6..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_29.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_29 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_30.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_30.cs deleted file mode 100644 index 7d45f1e342..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_30.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_30 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_31.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_31.cs deleted file mode 100644 index b67e7a1874..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_31.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_31 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_32.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_32.cs deleted file mode 100644 index 4b64a88237..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_32.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_32 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_33.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_33.cs deleted file mode 100644 index c248c373bb..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_33.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_33 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_34.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_34.cs deleted file mode 100644 index 5e7a1ee40c..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_34.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_34 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_35.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_35.cs deleted file mode 100644 index 4434e7c5c0..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_35.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_35 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_36.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_36.cs deleted file mode 100644 index 387cd5453c..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_36.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_36 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_37.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_37.cs deleted file mode 100644 index 9ae87dd4ab..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_37.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_37 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_38.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_38.cs deleted file mode 100644 index 9adb04b2ff..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_38.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_38 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_39.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_39.cs deleted file mode 100644 index ef18649149..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_39.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_39 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_40.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_40.cs deleted file mode 100644 index dd198c01eb..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_40.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_40 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_41.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_41.cs deleted file mode 100644 index 8def65d1e2..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_41.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_41 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_42.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_42.cs deleted file mode 100644 index 3225660b25..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_42.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_42 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_43.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_43.cs deleted file mode 100644 index 89938bc0ce..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_43.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_43 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_44.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_44.cs deleted file mode 100644 index fdb4aac33e..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_44.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_44 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_45.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_45.cs deleted file mode 100644 index 8190d6f534..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_45.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_45 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_46.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_46.cs deleted file mode 100644 index 0dc13ea650..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_46.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_46 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_47.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_47.cs deleted file mode 100644 index 394df81943..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_47.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_47 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_48.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_48.cs deleted file mode 100644 index 976699bb65..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_48.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_48 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_49.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_49.cs deleted file mode 100644 index ca7a04dec5..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_49.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_49 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_50.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_50.cs deleted file mode 100644 index a8dc3063c1..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_50.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_50 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_51.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_51.cs deleted file mode 100644 index da8168019c..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_51.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_51 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_52.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_52.cs deleted file mode 100644 index 5a8efc572b..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_52.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_52 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_53.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_53.cs deleted file mode 100644 index 2bad479f25..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_53.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_53 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_54.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_54.cs deleted file mode 100644 index f1af204a5a..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_54.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_54 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_55.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_55.cs deleted file mode 100644 index 430cd88e5d..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_55.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_55 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_56.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_56.cs deleted file mode 100644 index 858654676b..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_56.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_56 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_57.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_57.cs deleted file mode 100644 index 1b53ff39ff..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_57.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_57 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_58.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_58.cs deleted file mode 100644 index 52c1c06540..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_58.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_58 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_59.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_59.cs deleted file mode 100644 index 9a89dbb30f..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_59.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_59 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_60.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_60.cs deleted file mode 100644 index 45c7b6816a..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_60.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_60 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_61.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_61.cs deleted file mode 100644 index 36e74e5e30..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_61.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_61 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_62.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_62.cs deleted file mode 100644 index fdd0464b14..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_62.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_62 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_63.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_63.cs deleted file mode 100644 index 681fd8a4d4..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_63.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_63 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_64.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_64.cs deleted file mode 100644 index adb36b361e..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_64.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_64 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_65.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_65.cs deleted file mode 100644 index ea3414e77c..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_65.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_65 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_66.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_66.cs deleted file mode 100644 index a49c0d2b3e..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_66.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_66 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_67.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_67.cs deleted file mode 100644 index dcdc581c79..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_67.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_67 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_68.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_68.cs deleted file mode 100644 index 0ad737c3d8..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_68.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_68 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_69.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_69.cs deleted file mode 100644 index 7bdba55180..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_69.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_69 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_70.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_70.cs deleted file mode 100644 index 9fa4c42ab0..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_70.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_70 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_71.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_71.cs deleted file mode 100644 index 4c7f9a8319..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_71.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_71 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_72.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_72.cs deleted file mode 100644 index f1164b96a2..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_72.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_72 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_73.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_73.cs deleted file mode 100644 index 3f33c2f472..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_73.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_73 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_74.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_74.cs deleted file mode 100644 index 28856df61f..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_74.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_74 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_75.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_75.cs deleted file mode 100644 index c3c809195f..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_75.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_75 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_76.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_76.cs deleted file mode 100644 index fe74f8e111..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_76.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_76 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_77.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_77.cs deleted file mode 100644 index 21b0918df4..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_77.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_77 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_78.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_78.cs deleted file mode 100644 index cc749562f5..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_78.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_78 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_79.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_79.cs deleted file mode 100644 index 2ac95606de..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_79.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_79 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_80.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_80.cs deleted file mode 100644 index 9a6ffe5c16..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_80.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_80 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_81.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_81.cs deleted file mode 100644 index de72f16bed..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_81.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_81 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_82.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_82.cs deleted file mode 100644 index 906279dcfc..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_82.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_82 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_83.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_83.cs deleted file mode 100644 index 6b5fd9ecf5..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_83.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_83 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_84.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_84.cs deleted file mode 100644 index 9d2e99f2fe..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_84.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_84 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_85.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_85.cs deleted file mode 100644 index a462086847..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_85.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_85 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_86.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_86.cs deleted file mode 100644 index 59dc5a1d87..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_86.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_86 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_87.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_87.cs deleted file mode 100644 index f89ed3b09f..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_87.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_87 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_88.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_88.cs deleted file mode 100644 index 15759d6580..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_88.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_88 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_89.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_89.cs deleted file mode 100644 index b4e9d3d4bd..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_89.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_89 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_90.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_90.cs deleted file mode 100644 index d71ae4af4f..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_90.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_90 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_91.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_91.cs deleted file mode 100644 index eb109e9867..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_91.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_91 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_92.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_92.cs deleted file mode 100644 index a08b84eccc..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_92.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_92 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_93.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_93.cs deleted file mode 100644 index 08e10076e1..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_93.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_93 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_94.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_94.cs deleted file mode 100644 index 23d0d5b8bf..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_94.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_94 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_95.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_95.cs deleted file mode 100644 index 12b6f6a5f4..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_95.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_95 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_96.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_96.cs deleted file mode 100644 index ecfb256b48..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_96.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_96 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_97.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_97.cs deleted file mode 100644 index e4dd158da5..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_97.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_97 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_98.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_98.cs deleted file mode 100644 index fd5e42683d..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_98.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_98 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_99.cs b/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_99.cs deleted file mode 100644 index 7d41e4d78e..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Lifecycle/LifecycleTests_99.cs +++ /dev/null @@ -1,34 +0,0 @@ -using TUnit.Core.Interfaces; - -namespace TUnit.PerformanceBenchmarks.Tests.Lifecycle; - -public class LifecycleTests_99 : IAsyncInitializer, IAsyncDisposable -{ - private int _initialized; - - public Task InitializeAsync() - { - _initialized = 1; - return Task.CompletedTask; - } - - public ValueTask DisposeAsync() - { - _initialized = 0; - return ValueTask.CompletedTask; - } - - [Before(Test)] - public void BeforeEach() { _ = _initialized; } - - [After(Test)] - public void AfterEach() { _ = _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_01(int v) { _ = v + _initialized; } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - public void LifecycleTest_02(int v) { _ = v + _initialized; } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_100.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_100.cs deleted file mode 100644 index 44c9d19993..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_100.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_100 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_11.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_11.cs deleted file mode 100644 index e18141a991..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_11.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_11 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_12.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_12.cs deleted file mode 100644 index 05bca1ab43..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_12.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_12 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_13.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_13.cs deleted file mode 100644 index 7dc41d12be..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_13.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_13 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_14.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_14.cs deleted file mode 100644 index 2d7b1e8404..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_14.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_14 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_15.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_15.cs deleted file mode 100644 index 35468f9983..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_15.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_15 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_16.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_16.cs deleted file mode 100644 index a8f7bf2548..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_16.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_16 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_17.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_17.cs deleted file mode 100644 index f7c331e755..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_17.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_17 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_18.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_18.cs deleted file mode 100644 index b71ad81135..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_18.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_18 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_19.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_19.cs deleted file mode 100644 index b21fad8bc4..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_19.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_19 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_20.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_20.cs deleted file mode 100644 index d34970d290..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_20.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_20 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_21.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_21.cs deleted file mode 100644 index 4fc20ea6b5..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_21.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_21 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_22.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_22.cs deleted file mode 100644 index d0ee5818ee..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_22.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_22 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_23.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_23.cs deleted file mode 100644 index 837e371f9e..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_23.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_23 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_24.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_24.cs deleted file mode 100644 index bf16049016..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_24.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_24 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_25.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_25.cs deleted file mode 100644 index 7543757fb4..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_25.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_25 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_26.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_26.cs deleted file mode 100644 index 9392c7a765..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_26.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_26 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_27.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_27.cs deleted file mode 100644 index 61bb2957f7..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_27.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_27 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_28.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_28.cs deleted file mode 100644 index 0783445ddc..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_28.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_28 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_29.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_29.cs deleted file mode 100644 index d6f0b9832b..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_29.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_29 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_30.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_30.cs deleted file mode 100644 index d6f2fa03ae..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_30.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_30 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_31.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_31.cs deleted file mode 100644 index ca7c18d0c5..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_31.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_31 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_32.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_32.cs deleted file mode 100644 index 6026417cbc..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_32.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_32 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_33.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_33.cs deleted file mode 100644 index 7d583eec68..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_33.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_33 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_34.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_34.cs deleted file mode 100644 index 9019995eca..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_34.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_34 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_35.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_35.cs deleted file mode 100644 index 0be50dcc35..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_35.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_35 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_36.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_36.cs deleted file mode 100644 index 0a1df95ce0..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_36.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_36 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_37.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_37.cs deleted file mode 100644 index 65cd63d049..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_37.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_37 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_38.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_38.cs deleted file mode 100644 index 4ed6c7497f..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_38.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_38 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_39.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_39.cs deleted file mode 100644 index 94762d4dc2..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_39.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_39 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_40.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_40.cs deleted file mode 100644 index a885350836..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_40.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_40 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_41.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_41.cs deleted file mode 100644 index 5393595c3c..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_41.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_41 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_42.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_42.cs deleted file mode 100644 index 260c329ead..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_42.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_42 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_43.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_43.cs deleted file mode 100644 index 31eb82077a..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_43.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_43 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_44.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_44.cs deleted file mode 100644 index 7caa1672ed..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_44.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_44 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_45.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_45.cs deleted file mode 100644 index 1dd7a5c3a4..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_45.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_45 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_46.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_46.cs deleted file mode 100644 index 56574731d3..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_46.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_46 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_47.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_47.cs deleted file mode 100644 index 1f20361d34..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_47.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_47 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_48.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_48.cs deleted file mode 100644 index 8b1b596517..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_48.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_48 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_49.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_49.cs deleted file mode 100644 index 516b1dff60..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_49.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_49 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_50.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_50.cs deleted file mode 100644 index 7e66b9fcb3..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_50.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_50 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_51.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_51.cs deleted file mode 100644 index 1076c4b83b..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_51.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_51 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_52.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_52.cs deleted file mode 100644 index b3b0315b1f..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_52.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_52 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_53.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_53.cs deleted file mode 100644 index 5837f9d245..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_53.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_53 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_54.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_54.cs deleted file mode 100644 index 39b9a5b565..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_54.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_54 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_55.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_55.cs deleted file mode 100644 index efa85cb188..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_55.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_55 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_56.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_56.cs deleted file mode 100644 index c1348cd60e..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_56.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_56 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_57.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_57.cs deleted file mode 100644 index 2a9773b758..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_57.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_57 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_58.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_58.cs deleted file mode 100644 index 8828f25e20..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_58.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_58 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_59.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_59.cs deleted file mode 100644 index 90f44d36ba..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_59.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_59 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_60.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_60.cs deleted file mode 100644 index af52487e18..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_60.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_60 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_61.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_61.cs deleted file mode 100644 index 54debbf0ea..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_61.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_61 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_62.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_62.cs deleted file mode 100644 index 949392646e..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_62.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_62 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_63.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_63.cs deleted file mode 100644 index 1bc9e010fc..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_63.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_63 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_64.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_64.cs deleted file mode 100644 index 9b08f87450..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_64.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_64 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_65.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_65.cs deleted file mode 100644 index 02c28296ef..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_65.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_65 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_66.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_66.cs deleted file mode 100644 index 8f02a30952..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_66.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_66 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_67.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_67.cs deleted file mode 100644 index 0f7e20090a..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_67.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_67 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_68.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_68.cs deleted file mode 100644 index 8d44b52919..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_68.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_68 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_69.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_69.cs deleted file mode 100644 index d8a0eb71b1..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_69.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_69 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_70.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_70.cs deleted file mode 100644 index f99092abb9..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_70.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_70 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_71.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_71.cs deleted file mode 100644 index 4b7cac5924..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_71.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_71 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_72.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_72.cs deleted file mode 100644 index 913783723d..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_72.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_72 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_73.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_73.cs deleted file mode 100644 index 445ed7704a..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_73.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_73 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_74.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_74.cs deleted file mode 100644 index 98a9984475..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_74.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_74 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_75.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_75.cs deleted file mode 100644 index e05701c1bb..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_75.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_75 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_76.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_76.cs deleted file mode 100644 index 95c8ee317f..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_76.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_76 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_77.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_77.cs deleted file mode 100644 index 3ca01e8f2d..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_77.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_77 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_78.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_78.cs deleted file mode 100644 index 305fa27463..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_78.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_78 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_79.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_79.cs deleted file mode 100644 index 0bda1676b7..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_79.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_79 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_80.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_80.cs deleted file mode 100644 index 85f1b3c15c..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_80.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_80 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_81.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_81.cs deleted file mode 100644 index 7d65281c44..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_81.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_81 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_82.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_82.cs deleted file mode 100644 index 5e77b8c13e..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_82.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_82 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_83.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_83.cs deleted file mode 100644 index 1f25ada0b5..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_83.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_83 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_84.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_84.cs deleted file mode 100644 index 049c7ca1dd..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_84.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_84 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_85.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_85.cs deleted file mode 100644 index 2416dfab72..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_85.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_85 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_86.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_86.cs deleted file mode 100644 index 86aa276022..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_86.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_86 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_87.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_87.cs deleted file mode 100644 index 9489652116..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_87.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_87 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_88.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_88.cs deleted file mode 100644 index d2be56970b..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_88.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_88 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_89.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_89.cs deleted file mode 100644 index cb2d2444b0..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_89.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_89 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_90.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_90.cs deleted file mode 100644 index a2363d73b0..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_90.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_90 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_91.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_91.cs deleted file mode 100644 index a5d2d26967..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_91.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_91 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_92.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_92.cs deleted file mode 100644 index b4376b171c..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_92.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_92 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_93.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_93.cs deleted file mode 100644 index 5071ec211d..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_93.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_93 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_94.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_94.cs deleted file mode 100644 index 6f31d8f3e1..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_94.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_94 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_95.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_95.cs deleted file mode 100644 index 66f3179a30..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_95.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_95 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_96.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_96.cs deleted file mode 100644 index cd6f022984..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_96.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_96 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_97.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_97.cs deleted file mode 100644 index b4b2c18393..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_97.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_97 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_98.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_98.cs deleted file mode 100644 index 3f1d718776..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_98.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_98 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_99.cs b/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_99.cs deleted file mode 100644 index a24873abcc..0000000000 --- a/TUnit.PerformanceBenchmarks/Tests/Simple/SimpleTests_99.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace TUnit.PerformanceBenchmarks.Tests.Simple; - -public class SimpleTests_99 -{ - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_01(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_02(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_03(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_04(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_05(int v) { } - - [Test] - [Arguments(1), Arguments(2), Arguments(3), Arguments(4), Arguments(5)] - [Arguments(6), Arguments(7), Arguments(8), Arguments(9), Arguments(10)] - public void Test_06(int v) { } -} diff --git a/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet10_0.verified.txt b/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet10_0.verified.txt index b7877e01ac..327961c840 100644 --- a/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet10_0.verified.txt +++ b/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet10_0.verified.txt @@ -1268,7 +1268,12 @@ namespace public static void RegisterAssembly(<.Assembly> assemblyLoader) { } public static void RegisterDynamic(.IDynamicTestSource testSource) { } public static void RegisterGlobalInitializer(<.> initializer) { } + public static int RegisterHook(. bag, T hook) { } + public static int RegisterHook(.<.Assembly, .> dictionary, .Assembly key, T hook) { } + public static int RegisterHook(.<, .> dictionary, key, T hook) { } public static void RegisterProperty(..IPropertySource propertySource) { } + public static int RegisterReturn( testClassType, ..ITestSource testSource) { } + public static int RegisterReturn( testClassType, > getTests, <.<.TestDescriptor>> enumerateDescriptors) { } } public static class Sources { diff --git a/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet8_0.verified.txt b/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet8_0.verified.txt index e71ba56dfd..85a83596f6 100644 --- a/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet8_0.verified.txt +++ b/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet8_0.verified.txt @@ -1268,7 +1268,12 @@ namespace public static void RegisterAssembly(<.Assembly> assemblyLoader) { } public static void RegisterDynamic(.IDynamicTestSource testSource) { } public static void RegisterGlobalInitializer(<.> initializer) { } + public static int RegisterHook(. bag, T hook) { } + public static int RegisterHook(.<.Assembly, .> dictionary, .Assembly key, T hook) { } + public static int RegisterHook(.<, .> dictionary, key, T hook) { } public static void RegisterProperty(..IPropertySource propertySource) { } + public static int RegisterReturn( testClassType, ..ITestSource testSource) { } + public static int RegisterReturn( testClassType, > getTests, <.<.TestDescriptor>> enumerateDescriptors) { } } public static class Sources { diff --git a/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet9_0.verified.txt b/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet9_0.verified.txt index 70ae813e0c..ddb5826053 100644 --- a/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet9_0.verified.txt +++ b/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet9_0.verified.txt @@ -1268,7 +1268,12 @@ namespace public static void RegisterAssembly(<.Assembly> assemblyLoader) { } public static void RegisterDynamic(.IDynamicTestSource testSource) { } public static void RegisterGlobalInitializer(<.> initializer) { } + public static int RegisterHook(. bag, T hook) { } + public static int RegisterHook(.<.Assembly, .> dictionary, .Assembly key, T hook) { } + public static int RegisterHook(.<, .> dictionary, key, T hook) { } public static void RegisterProperty(..IPropertySource propertySource) { } + public static int RegisterReturn( testClassType, ..ITestSource testSource) { } + public static int RegisterReturn( testClassType, > getTests, <.<.TestDescriptor>> enumerateDescriptors) { } } public static class Sources { diff --git a/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.Net4_7.verified.txt b/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.Net4_7.verified.txt index 4290a16f46..395dbdfe90 100644 --- a/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.Net4_7.verified.txt +++ b/TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.Net4_7.verified.txt @@ -1223,7 +1223,12 @@ namespace public static void RegisterAssembly(<.Assembly> assemblyLoader) { } public static void RegisterDynamic(.IDynamicTestSource testSource) { } public static void RegisterGlobalInitializer(<.> initializer) { } + public static int RegisterHook(. bag, T hook) { } + public static int RegisterHook(.<.Assembly, .> dictionary, .Assembly key, T hook) { } + public static int RegisterHook(.<, .> dictionary, key, T hook) { } public static void RegisterProperty(..IPropertySource propertySource) { } + public static int RegisterReturn( testClassType, ..ITestSource testSource) { } + public static int RegisterReturn( testClassType, > getTests, <.<.TestDescriptor>> enumerateDescriptors) { } } public static class Sources {