diff --git a/TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete1.verified.txt b/TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete1.verified.txt index c42ddeb5f0..685ec47c17 100644 --- a/TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete1.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete1.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -72,6 +72,24 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClass yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.AbstractTests.ConcreteClass1.AssertClassName", + ClassName = "ConcreteClass1", + MethodName = "AssertClassName", + FullyQualifiedName = "TUnit.TestProject.AbstractTests.ConcreteClass1.AssertClassName", + FilePath = @"", + LineNumber = 3, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete2.verified.txt b/TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete2.verified.txt index fdd9b1edda..1ea0f8ba88 100644 --- a/TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete2.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete2.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_SecondTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_SecondTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -74,6 +74,24 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_SecondTest_ yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.AbstractTests.ConcreteClass2.SecondTest", + ClassName = "ConcreteClass2", + MethodName = "SecondTest", + FullyQualifiedName = "TUnit.TestProject.AbstractTests.ConcreteClass2.SecondTest", + FilePath = @"", + LineNumber = 11, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_AbstractTests_ConcreteClass2_SecondTest_ModuleInitializer { @@ -92,7 +110,7 @@ internal static class TUnit_TestProject_AbstractTests_ConcreteClass2_SecondTest_ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClassName_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClassName_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -162,6 +180,24 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClass yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.AbstractTests.ConcreteClass2.AssertClassName", + ClassName = "ConcreteClass2", + MethodName = "AssertClassName", + FullyQualifiedName = "TUnit.TestProject.AbstractTests.ConcreteClass2.AssertClassName", + FilePath = @"", + LineNumber = 3, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClassName_ModuleInitializer { @@ -180,7 +216,7 @@ internal static class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClass #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -249,6 +285,24 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClass yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.AbstractTests.ConcreteClass1.AssertClassName", + ClassName = "ConcreteClass1", + MethodName = "AssertClassName", + FullyQualifiedName = "TUnit.TestProject.AbstractTests.ConcreteClass1.AssertClassName", + FilePath = @"", + LineNumber = 3, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/AfterAllTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/AfterAllTests.Test.verified.txt index 35dae8961b..b9d4780123 100644 --- a/TUnit.Core.SourceGenerator.Tests/AfterAllTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/AfterAllTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -71,6 +71,24 @@ internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test1_TestSource yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.AfterTests.CleanupTests.Test1", + ClassName = "CleanupTests", + MethodName = "Test1", + FullyQualifiedName = "TUnit.TestProject.AfterTests.CleanupTests.Test1", + FilePath = @"", + LineNumber = 98, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_AfterTests_CleanupTests_Test1_ModuleInitializer { @@ -89,7 +107,7 @@ internal static class TUnit_TestProject_AfterTests_CleanupTests_Test1_ModuleInit #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test2_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test2_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -157,6 +175,24 @@ internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test2_TestSource yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.AfterTests.CleanupTests.Test2", + ClassName = "CleanupTests", + MethodName = "Test2", + FullyQualifiedName = "TUnit.TestProject.AfterTests.CleanupTests.Test2", + FilePath = @"", + LineNumber = 104, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_AfterTests_CleanupTests_Test2_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/AfterTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/AfterTests.Test.verified.txt index 35dae8961b..b9d4780123 100644 --- a/TUnit.Core.SourceGenerator.Tests/AfterTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/AfterTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -71,6 +71,24 @@ internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test1_TestSource yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.AfterTests.CleanupTests.Test1", + ClassName = "CleanupTests", + MethodName = "Test1", + FullyQualifiedName = "TUnit.TestProject.AfterTests.CleanupTests.Test1", + FilePath = @"", + LineNumber = 98, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_AfterTests_CleanupTests_Test1_ModuleInitializer { @@ -89,7 +107,7 @@ internal static class TUnit_TestProject_AfterTests_CleanupTests_Test1_ModuleInit #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test2_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test2_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -157,6 +175,24 @@ internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test2_TestSource yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.AfterTests.CleanupTests.Test2", + ClassName = "CleanupTests", + MethodName = "Test2", + FullyQualifiedName = "TUnit.TestProject.AfterTests.CleanupTests.Test2", + FilePath = @"", + LineNumber = 104, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_AfterTests_CleanupTests_Test2_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/ArgsAsArrayTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ArgsAsArrayTests.Test.verified.txt index 7cb140d823..f2b9cc3927 100644 --- a/TUnit.Core.SourceGenerator.Tests/ArgsAsArrayTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ArgsAsArrayTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ArgsAsArrayTests_Params__string___TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ArgsAsArrayTests_Params__string___TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -122,6 +122,24 @@ internal sealed class TUnit_TestProject_ArgsAsArrayTests_Params__string___TestSo yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ArgsAsArrayTests.Params", + ClassName = "ArgsAsArrayTests", + MethodName = "Params", + FullyQualifiedName = "TUnit.TestProject.ArgsAsArrayTests.Params", + FilePath = @"", + LineNumber = 5, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ArgsAsArrayTests_Params__string___ModuleInitializer { @@ -140,7 +158,7 @@ internal static class TUnit_TestProject_ArgsAsArrayTests_Params__string___Module #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ArgsAsArrayTests_ParamsEnumerable__IEnumerable_string__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ArgsAsArrayTests_ParamsEnumerable__IEnumerable_string__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -259,6 +277,24 @@ internal sealed class TUnit_TestProject_ArgsAsArrayTests_ParamsEnumerable__IEnum yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ArgsAsArrayTests.ParamsEnumerable", + ClassName = "ArgsAsArrayTests", + MethodName = "ParamsEnumerable", + FullyQualifiedName = "TUnit.TestProject.ArgsAsArrayTests.ParamsEnumerable", + FilePath = @"", + LineNumber = 15, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ArgsAsArrayTests_ParamsEnumerable__IEnumerable_string__ModuleInitializer { @@ -277,7 +313,7 @@ internal static class TUnit_TestProject_ArgsAsArrayTests_ParamsEnumerable__IEnum #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ArgsAsArrayTests_Following_Non_Params__int_IEnumerable_string__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ArgsAsArrayTests_Following_Non_Params__int_IEnumerable_string__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -403,6 +439,24 @@ internal sealed class TUnit_TestProject_ArgsAsArrayTests_Following_Non_Params__i yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ArgsAsArrayTests.Following_Non_Params", + ClassName = "ArgsAsArrayTests", + MethodName = "Following_Non_Params", + FullyQualifiedName = "TUnit.TestProject.ArgsAsArrayTests.Following_Non_Params", + FilePath = @"", + LineNumber = 25, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ArgsAsArrayTests_Following_Non_Params__int_IEnumerable_string__ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/ArgumentWithImplicitConverterTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ArgumentWithImplicitConverterTests.Test.verified.txt index bb479a9d9d..eeba38ff95 100644 --- a/TUnit.Core.SourceGenerator.Tests/ArgumentWithImplicitConverterTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ArgumentWithImplicitConverterTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ArgumentWithImplicitConverterTests_Explicit__ExplicitInteger_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ArgumentWithImplicitConverterTests_Explicit__ExplicitInteger_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -95,6 +95,24 @@ internal sealed class TUnit_TestProject_ArgumentWithImplicitConverterTests_Expli yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ArgumentWithImplicitConverterTests.Explicit", + ClassName = "ArgumentWithImplicitConverterTests", + MethodName = "Explicit", + FullyQualifiedName = "TUnit.TestProject.ArgumentWithImplicitConverterTests.Explicit", + FilePath = @"", + LineNumber = 8, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ArgumentWithImplicitConverterTests_Explicit__ExplicitInteger_ModuleInitializer { @@ -113,7 +131,7 @@ internal static class TUnit_TestProject_ArgumentWithImplicitConverterTests_Expli #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ArgumentWithImplicitConverterTests_Implicit__ImplicitInteger_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ArgumentWithImplicitConverterTests_Implicit__ImplicitInteger_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -205,6 +223,24 @@ internal sealed class TUnit_TestProject_ArgumentWithImplicitConverterTests_Impli yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ArgumentWithImplicitConverterTests.Implicit", + ClassName = "ArgumentWithImplicitConverterTests", + MethodName = "Implicit", + FullyQualifiedName = "TUnit.TestProject.ArgumentWithImplicitConverterTests.Implicit", + FilePath = @"", + LineNumber = 17, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ArgumentWithImplicitConverterTests_Implicit__ImplicitInteger_ModuleInitializer { 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 c8a67d8392..f494ba5ce8 100644 --- a/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet10_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet10_0.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -72,6 +72,24 @@ internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.SynchronousTest", + ClassName = "BasicTests", + MethodName = "SynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.SynchronousTest", + FilePath = @"", + LineNumber = 5, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_SynchronousTest_ModuleInitializer { @@ -90,7 +108,7 @@ internal static class TUnit_TestProject_BasicTests_SynchronousTest_ModuleInitial #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -158,6 +176,24 @@ internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.AsynchronousTest", + ClassName = "BasicTests", + MethodName = "AsynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.AsynchronousTest", + FilePath = @"", + LineNumber = 11, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_AsynchronousTest_ModuleInitializer { @@ -176,7 +212,7 @@ internal static class TUnit_TestProject_BasicTests_AsynchronousTest_ModuleInitia #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -244,6 +280,24 @@ internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_Tes yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", + ClassName = "BasicTests", + MethodName = "ValueTaskAsynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", + FilePath = @"", + LineNumber = 17, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_ModuleInitializer { 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 c8a67d8392..f494ba5ce8 100644 --- a/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet8_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet8_0.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -72,6 +72,24 @@ internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.SynchronousTest", + ClassName = "BasicTests", + MethodName = "SynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.SynchronousTest", + FilePath = @"", + LineNumber = 5, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_SynchronousTest_ModuleInitializer { @@ -90,7 +108,7 @@ internal static class TUnit_TestProject_BasicTests_SynchronousTest_ModuleInitial #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -158,6 +176,24 @@ internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.AsynchronousTest", + ClassName = "BasicTests", + MethodName = "AsynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.AsynchronousTest", + FilePath = @"", + LineNumber = 11, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_AsynchronousTest_ModuleInitializer { @@ -176,7 +212,7 @@ internal static class TUnit_TestProject_BasicTests_AsynchronousTest_ModuleInitia #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -244,6 +280,24 @@ internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_Tes yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", + ClassName = "BasicTests", + MethodName = "ValueTaskAsynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", + FilePath = @"", + LineNumber = 17, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_ModuleInitializer { 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 c8a67d8392..f494ba5ce8 100644 --- a/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet9_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.DotNet9_0.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -72,6 +72,24 @@ internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.SynchronousTest", + ClassName = "BasicTests", + MethodName = "SynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.SynchronousTest", + FilePath = @"", + LineNumber = 5, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_SynchronousTest_ModuleInitializer { @@ -90,7 +108,7 @@ internal static class TUnit_TestProject_BasicTests_SynchronousTest_ModuleInitial #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -158,6 +176,24 @@ internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.AsynchronousTest", + ClassName = "BasicTests", + MethodName = "AsynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.AsynchronousTest", + FilePath = @"", + LineNumber = 11, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_AsynchronousTest_ModuleInitializer { @@ -176,7 +212,7 @@ internal static class TUnit_TestProject_BasicTests_AsynchronousTest_ModuleInitia #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -244,6 +280,24 @@ internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_Tes yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", + ClassName = "BasicTests", + MethodName = "ValueTaskAsynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", + FilePath = @"", + LineNumber = 17, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_ModuleInitializer { 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 f5b2d3d7d7..c24216fbe3 100644 --- a/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.Net4_7.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.Net4_7.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -72,6 +72,24 @@ internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.SynchronousTest", + ClassName = "BasicTests", + MethodName = "SynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.SynchronousTest", + FilePath = @"", + LineNumber = 5, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_SynchronousTest_ModuleInitializer { @@ -90,7 +108,7 @@ internal static class TUnit_TestProject_BasicTests_SynchronousTest_ModuleInitial #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -158,6 +176,24 @@ internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.AsynchronousTest", + ClassName = "BasicTests", + MethodName = "AsynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.AsynchronousTest", + FilePath = @"", + LineNumber = 11, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_AsynchronousTest_ModuleInitializer { @@ -176,7 +212,7 @@ internal static class TUnit_TestProject_BasicTests_AsynchronousTest_ModuleInitia #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -244,6 +280,24 @@ internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_Tes yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", + ClassName = "BasicTests", + MethodName = "ValueTaskAsynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", + FilePath = @"", + LineNumber = 17, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/AsyncMethodDataSourceDrivenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/AsyncMethodDataSourceDrivenTests.Test.verified.txt index aeee5efd13..904157b952 100644 --- a/TUnit.Core.SourceGenerator.Tests/AsyncMethodDataSourceDrivenTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/AsyncMethodDataSourceDrivenTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_SingleValue__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_SingleValue__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -113,6 +113,24 @@ internal sealed class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMe yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.AsyncMethodDataSourceDrivenTests.AsyncMethodDataSource_SingleValue", + ClassName = "AsyncMethodDataSourceDrivenTests", + MethodName = "AsyncMethodDataSource_SingleValue", + FullyQualifiedName = "TUnit.TestProject.AsyncMethodDataSourceDrivenTests.AsyncMethodDataSource_SingleValue", + FilePath = @"", + LineNumber = 8, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_SingleValue__int_ModuleInitializer { @@ -131,7 +149,7 @@ internal static class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMe #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Tuples__int_string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Tuples__int_string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -248,6 +266,24 @@ internal sealed class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMe yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.AsyncMethodDataSourceDrivenTests.AsyncMethodDataSource_Tuples", + ClassName = "AsyncMethodDataSourceDrivenTests", + MethodName = "AsyncMethodDataSource_Tuples", + FullyQualifiedName = "TUnit.TestProject.AsyncMethodDataSourceDrivenTests.AsyncMethodDataSource_Tuples", + FilePath = @"", + LineNumber = 15, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Tuples__int_string_ModuleInitializer { @@ -266,7 +302,7 @@ internal static class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMe #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Enumerable__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Enumerable__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -376,6 +412,24 @@ internal sealed class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMe yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.AsyncMethodDataSourceDrivenTests.AsyncMethodDataSource_Enumerable", + ClassName = "AsyncMethodDataSourceDrivenTests", + MethodName = "AsyncMethodDataSource_Enumerable", + FullyQualifiedName = "TUnit.TestProject.AsyncMethodDataSourceDrivenTests.AsyncMethodDataSource_Enumerable", + FilePath = @"", + LineNumber = 23, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Enumerable__int_ModuleInitializer { @@ -394,7 +448,7 @@ internal static class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMe #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Func__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Func__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -504,6 +558,24 @@ internal sealed class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMe yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.AsyncMethodDataSourceDrivenTests.AsyncMethodDataSource_Func", + ClassName = "AsyncMethodDataSourceDrivenTests", + MethodName = "AsyncMethodDataSource_Func", + FullyQualifiedName = "TUnit.TestProject.AsyncMethodDataSourceDrivenTests.AsyncMethodDataSource_Func", + FilePath = @"", + LineNumber = 30, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_Func__int_ModuleInitializer { @@ -522,7 +594,7 @@ internal static class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMe #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_WithArguments__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_WithArguments__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -632,6 +704,24 @@ internal sealed class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMe yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.AsyncMethodDataSourceDrivenTests.AsyncMethodDataSource_WithArguments", + ClassName = "AsyncMethodDataSourceDrivenTests", + MethodName = "AsyncMethodDataSource_WithArguments", + FullyQualifiedName = "TUnit.TestProject.AsyncMethodDataSourceDrivenTests.AsyncMethodDataSource_WithArguments", + FilePath = @"", + LineNumber = 37, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_WithArguments__int_ModuleInitializer { @@ -650,7 +740,7 @@ internal static class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMe #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_ExternalClass__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_ExternalClass__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -760,6 +850,24 @@ internal sealed class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMe yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.AsyncMethodDataSourceDrivenTests.AsyncMethodDataSource_ExternalClass", + ClassName = "AsyncMethodDataSourceDrivenTests", + MethodName = "AsyncMethodDataSource_ExternalClass", + FullyQualifiedName = "TUnit.TestProject.AsyncMethodDataSourceDrivenTests.AsyncMethodDataSource_ExternalClass", + FilePath = @"", + LineNumber = 44, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMethodDataSource_ExternalClass__string_ModuleInitializer { @@ -778,7 +886,7 @@ internal static class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_AsyncMe #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_ValueTaskMethodDataSource_SingleValue__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_ValueTaskMethodDataSource_SingleValue__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -888,6 +996,24 @@ internal sealed class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_ValueTa yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.AsyncMethodDataSourceDrivenTests.ValueTaskMethodDataSource_SingleValue", + ClassName = "AsyncMethodDataSourceDrivenTests", + MethodName = "ValueTaskMethodDataSource_SingleValue", + FullyQualifiedName = "TUnit.TestProject.AsyncMethodDataSourceDrivenTests.ValueTaskMethodDataSource_SingleValue", + FilePath = @"", + LineNumber = 51, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_AsyncMethodDataSourceDrivenTests_ValueTaskMethodDataSource_SingleValue__int_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/AttributeTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/AttributeTests.Test.verified.txt index 60f3ea71f7..305c34ee8a 100644 --- a/TUnit.Core.SourceGenerator.Tests/AttributeTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/AttributeTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_AttributeTests_MyTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_AttributeTests_MyTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -84,6 +84,24 @@ internal sealed class TUnit_TestProject_AttributeTests_MyTest_TestSource : globa yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.AttributeTests.MyTest", + ClassName = "AttributeTests", + MethodName = "MyTest", + FullyQualifiedName = "TUnit.TestProject.AttributeTests.MyTest", + FilePath = @"", + LineNumber = 7, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_AttributeTests_MyTest_ModuleInitializer { 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 c8a67d8392..f494ba5ce8 100644 --- a/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet10_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet10_0.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -72,6 +72,24 @@ internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.SynchronousTest", + ClassName = "BasicTests", + MethodName = "SynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.SynchronousTest", + FilePath = @"", + LineNumber = 5, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_SynchronousTest_ModuleInitializer { @@ -90,7 +108,7 @@ internal static class TUnit_TestProject_BasicTests_SynchronousTest_ModuleInitial #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -158,6 +176,24 @@ internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.AsynchronousTest", + ClassName = "BasicTests", + MethodName = "AsynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.AsynchronousTest", + FilePath = @"", + LineNumber = 11, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_AsynchronousTest_ModuleInitializer { @@ -176,7 +212,7 @@ internal static class TUnit_TestProject_BasicTests_AsynchronousTest_ModuleInitia #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -244,6 +280,24 @@ internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_Tes yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", + ClassName = "BasicTests", + MethodName = "ValueTaskAsynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", + FilePath = @"", + LineNumber = 17, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_ModuleInitializer { 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 c8a67d8392..f494ba5ce8 100644 --- a/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet8_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet8_0.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -72,6 +72,24 @@ internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.SynchronousTest", + ClassName = "BasicTests", + MethodName = "SynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.SynchronousTest", + FilePath = @"", + LineNumber = 5, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_SynchronousTest_ModuleInitializer { @@ -90,7 +108,7 @@ internal static class TUnit_TestProject_BasicTests_SynchronousTest_ModuleInitial #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -158,6 +176,24 @@ internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.AsynchronousTest", + ClassName = "BasicTests", + MethodName = "AsynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.AsynchronousTest", + FilePath = @"", + LineNumber = 11, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_AsynchronousTest_ModuleInitializer { @@ -176,7 +212,7 @@ internal static class TUnit_TestProject_BasicTests_AsynchronousTest_ModuleInitia #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -244,6 +280,24 @@ internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_Tes yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", + ClassName = "BasicTests", + MethodName = "ValueTaskAsynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", + FilePath = @"", + LineNumber = 17, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_ModuleInitializer { 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 c8a67d8392..f494ba5ce8 100644 --- a/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet9_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.DotNet9_0.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -72,6 +72,24 @@ internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.SynchronousTest", + ClassName = "BasicTests", + MethodName = "SynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.SynchronousTest", + FilePath = @"", + LineNumber = 5, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_SynchronousTest_ModuleInitializer { @@ -90,7 +108,7 @@ internal static class TUnit_TestProject_BasicTests_SynchronousTest_ModuleInitial #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -158,6 +176,24 @@ internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.AsynchronousTest", + ClassName = "BasicTests", + MethodName = "AsynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.AsynchronousTest", + FilePath = @"", + LineNumber = 11, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_AsynchronousTest_ModuleInitializer { @@ -176,7 +212,7 @@ internal static class TUnit_TestProject_BasicTests_AsynchronousTest_ModuleInitia #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -244,6 +280,24 @@ internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_Tes yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", + ClassName = "BasicTests", + MethodName = "ValueTaskAsynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", + FilePath = @"", + LineNumber = 17, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_ModuleInitializer { 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 f5b2d3d7d7..c24216fbe3 100644 --- a/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.Net4_7.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.Net4_7.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -72,6 +72,24 @@ internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.SynchronousTest", + ClassName = "BasicTests", + MethodName = "SynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.SynchronousTest", + FilePath = @"", + LineNumber = 5, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_SynchronousTest_ModuleInitializer { @@ -90,7 +108,7 @@ internal static class TUnit_TestProject_BasicTests_SynchronousTest_ModuleInitial #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -158,6 +176,24 @@ internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.AsynchronousTest", + ClassName = "BasicTests", + MethodName = "AsynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.AsynchronousTest", + FilePath = @"", + LineNumber = 11, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_AsynchronousTest_ModuleInitializer { @@ -176,7 +212,7 @@ internal static class TUnit_TestProject_BasicTests_AsynchronousTest_ModuleInitia #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -244,6 +280,24 @@ internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_Tes yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", + ClassName = "BasicTests", + MethodName = "ValueTaskAsynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", + FilePath = @"", + LineNumber = 17, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/BeforeAllTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/BeforeAllTests.Test.verified.txt index 264ca836a8..d0b417842c 100644 --- a/TUnit.Core.SourceGenerator.Tests/BeforeAllTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/BeforeAllTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BeforeTests_SetupTests_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BeforeTests_SetupTests_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -71,6 +71,24 @@ internal sealed class TUnit_TestProject_BeforeTests_SetupTests_Test1_TestSource yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BeforeTests.SetupTests.Test1", + ClassName = "SetupTests", + MethodName = "Test1", + FullyQualifiedName = "TUnit.TestProject.BeforeTests.SetupTests.Test1", + FilePath = @"", + LineNumber = 98, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BeforeTests_SetupTests_Test1_ModuleInitializer { @@ -89,7 +107,7 @@ internal static class TUnit_TestProject_BeforeTests_SetupTests_Test1_ModuleIniti #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BeforeTests_SetupTests_Test2_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BeforeTests_SetupTests_Test2_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -157,6 +175,24 @@ internal sealed class TUnit_TestProject_BeforeTests_SetupTests_Test2_TestSource yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BeforeTests.SetupTests.Test2", + ClassName = "SetupTests", + MethodName = "Test2", + FullyQualifiedName = "TUnit.TestProject.BeforeTests.SetupTests.Test2", + FilePath = @"", + LineNumber = 104, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BeforeTests_SetupTests_Test2_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/BeforeTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/BeforeTests.Test.verified.txt index 264ca836a8..d0b417842c 100644 --- a/TUnit.Core.SourceGenerator.Tests/BeforeTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/BeforeTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BeforeTests_SetupTests_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BeforeTests_SetupTests_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -71,6 +71,24 @@ internal sealed class TUnit_TestProject_BeforeTests_SetupTests_Test1_TestSource yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BeforeTests.SetupTests.Test1", + ClassName = "SetupTests", + MethodName = "Test1", + FullyQualifiedName = "TUnit.TestProject.BeforeTests.SetupTests.Test1", + FilePath = @"", + LineNumber = 98, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BeforeTests_SetupTests_Test1_ModuleInitializer { @@ -89,7 +107,7 @@ internal static class TUnit_TestProject_BeforeTests_SetupTests_Test1_ModuleIniti #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BeforeTests_SetupTests_Test2_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BeforeTests_SetupTests_Test2_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -157,6 +175,24 @@ internal sealed class TUnit_TestProject_BeforeTests_SetupTests_Test2_TestSource yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BeforeTests.SetupTests.Test2", + ClassName = "SetupTests", + MethodName = "Test2", + FullyQualifiedName = "TUnit.TestProject.BeforeTests.SetupTests.Test2", + FilePath = @"", + LineNumber = 104, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BeforeTests_SetupTests_Test2_ModuleInitializer { 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 01c15f97fd..dab648aeab 100644 --- a/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet10_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet10_0.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__2971_Tests_SimpleTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__2971_Tests_SimpleTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -73,6 +73,24 @@ internal sealed class TUnit_TestProject_Bugs__2971_Tests_SimpleTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._2971.Tests.SimpleTest", + ClassName = "Tests", + MethodName = "SimpleTest", + FullyQualifiedName = "TUnit.TestProject.Bugs._2971.Tests.SimpleTest", + FilePath = @"", + LineNumber = 19, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__2971_Tests_SimpleTest_ModuleInitializer { 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 01c15f97fd..dab648aeab 100644 --- a/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet8_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet8_0.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__2971_Tests_SimpleTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__2971_Tests_SimpleTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -73,6 +73,24 @@ internal sealed class TUnit_TestProject_Bugs__2971_Tests_SimpleTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._2971.Tests.SimpleTest", + ClassName = "Tests", + MethodName = "SimpleTest", + FullyQualifiedName = "TUnit.TestProject.Bugs._2971.Tests.SimpleTest", + FilePath = @"", + LineNumber = 19, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__2971_Tests_SimpleTest_ModuleInitializer { 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 01c15f97fd..dab648aeab 100644 --- a/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet9_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.DotNet9_0.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__2971_Tests_SimpleTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__2971_Tests_SimpleTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -73,6 +73,24 @@ internal sealed class TUnit_TestProject_Bugs__2971_Tests_SimpleTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._2971.Tests.SimpleTest", + ClassName = "Tests", + MethodName = "SimpleTest", + FullyQualifiedName = "TUnit.TestProject.Bugs._2971.Tests.SimpleTest", + FilePath = @"", + LineNumber = 19, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__2971_Tests_SimpleTest_ModuleInitializer { 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 342d08b675..12908df624 100644 --- a/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.Net4_7.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.Net4_7.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__2971_Tests_SimpleTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__2971_Tests_SimpleTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -73,6 +73,24 @@ internal sealed class TUnit_TestProject_Bugs__2971_Tests_SimpleTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._2971.Tests.SimpleTest", + ClassName = "Tests", + MethodName = "SimpleTest", + FullyQualifiedName = "TUnit.TestProject.Bugs._2971.Tests.SimpleTest", + FilePath = @"", + LineNumber = 19, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__2971_Tests_SimpleTest_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/ClassAndMethodArgumentsTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ClassAndMethodArgumentsTests.Test.verified.txt index 1d7ccc4407..8470897d7d 100644 --- a/TUnit.Core.SourceGenerator.Tests/ClassAndMethodArgumentsTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ClassAndMethodArgumentsTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ClassAndMethodArgumentsTests_Simple_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ClassAndMethodArgumentsTests_Simple_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -89,6 +89,24 @@ internal sealed class TUnit_TestProject_ClassAndMethodArgumentsTests_Simple_Test yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ClassAndMethodArgumentsTests.Simple", + ClassName = "ClassAndMethodArgumentsTests", + MethodName = "Simple", + FullyQualifiedName = "TUnit.TestProject.ClassAndMethodArgumentsTests.Simple", + FilePath = @"", + LineNumber = 8, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ClassAndMethodArgumentsTests_Simple_ModuleInitializer { @@ -107,7 +125,7 @@ internal static class TUnit_TestProject_ClassAndMethodArgumentsTests_Simple_Modu #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ClassAndMethodArgumentsTests_WithMethodLevel__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ClassAndMethodArgumentsTests_WithMethodLevel__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -214,6 +232,24 @@ internal sealed class TUnit_TestProject_ClassAndMethodArgumentsTests_WithMethodL yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ClassAndMethodArgumentsTests.WithMethodLevel", + ClassName = "ClassAndMethodArgumentsTests", + MethodName = "WithMethodLevel", + FullyQualifiedName = "TUnit.TestProject.ClassAndMethodArgumentsTests.WithMethodLevel", + FilePath = @"", + LineNumber = 11, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ClassAndMethodArgumentsTests_WithMethodLevel__string_ModuleInitializer { @@ -232,7 +268,7 @@ internal static class TUnit_TestProject_ClassAndMethodArgumentsTests_WithMethodL #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ClassAndMethodArgumentsTests_IgnoreParameters__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ClassAndMethodArgumentsTests_IgnoreParameters__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -339,6 +375,24 @@ internal sealed class TUnit_TestProject_ClassAndMethodArgumentsTests_IgnoreParam yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ClassAndMethodArgumentsTests.IgnoreParameters", + ClassName = "ClassAndMethodArgumentsTests", + MethodName = "IgnoreParameters", + FullyQualifiedName = "TUnit.TestProject.ClassAndMethodArgumentsTests.IgnoreParameters", + FilePath = @"", + LineNumber = 16, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ClassAndMethodArgumentsTests_IgnoreParameters__string_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/ClassConstructorTest.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ClassConstructorTest.Test.verified.txt index 74e8910822..4f1a6fc4a0 100644 --- a/TUnit.Core.SourceGenerator.Tests/ClassConstructorTest.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ClassConstructorTest.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ClassConstructorTest_Test_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ClassConstructorTest_Test_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -99,6 +99,24 @@ internal sealed class TUnit_TestProject_ClassConstructorTest_Test_TestSource : g yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ClassConstructorTest.Test", + ClassName = "ClassConstructorTest", + MethodName = "Test", + FullyQualifiedName = "TUnit.TestProject.ClassConstructorTest.Test", + FilePath = @"", + LineNumber = 8, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ClassConstructorTest_Test_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests.Test.verified.txt index 01fcc949d8..e00ab69df9 100644 --- a/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests_DataSource_Class__SomeAsyncDisposableClass_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests_DataSource_Class__SomeAsyncDisposableClass_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -93,6 +93,24 @@ internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests_DataSource_Cl yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ClassDataSourceDrivenTests.DataSource_Class", + ClassName = "ClassDataSourceDrivenTests", + MethodName = "DataSource_Class", + FullyQualifiedName = "TUnit.TestProject.ClassDataSourceDrivenTests.DataSource_Class", + FilePath = @"", + LineNumber = 9, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ClassDataSourceDrivenTests_DataSource_Class__SomeAsyncDisposableClass_ModuleInitializer { @@ -111,7 +129,7 @@ internal static class TUnit_TestProject_ClassDataSourceDrivenTests_DataSource_Cl #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests_DataSource_Class_Generic__SomeAsyncDisposableClass_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests_DataSource_Class_Generic__SomeAsyncDisposableClass_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -201,6 +219,24 @@ internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests_DataSource_Cl yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ClassDataSourceDrivenTests.DataSource_Class_Generic", + ClassName = "ClassDataSourceDrivenTests", + MethodName = "DataSource_Class_Generic", + FullyQualifiedName = "TUnit.TestProject.ClassDataSourceDrivenTests.DataSource_Class_Generic", + FilePath = @"", + LineNumber = 16, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ClassDataSourceDrivenTests_DataSource_Class_Generic__SomeAsyncDisposableClass_ModuleInitializer { @@ -219,7 +255,7 @@ internal static class TUnit_TestProject_ClassDataSourceDrivenTests_DataSource_Cl #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests_IsInitialized_With_1_ClassDataSource__InitializableClass_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests_IsInitialized_With_1_ClassDataSource__InitializableClass_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -308,6 +344,24 @@ internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests_IsInitialized yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ClassDataSourceDrivenTests.IsInitialized_With_1_ClassDataSource", + ClassName = "ClassDataSourceDrivenTests", + MethodName = "IsInitialized_With_1_ClassDataSource", + FullyQualifiedName = "TUnit.TestProject.ClassDataSourceDrivenTests.IsInitialized_With_1_ClassDataSource", + FilePath = @"", + LineNumber = 23, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ClassDataSourceDrivenTests_IsInitialized_With_1_ClassDataSource__InitializableClass_ModuleInitializer { @@ -326,7 +380,7 @@ internal static class TUnit_TestProject_ClassDataSourceDrivenTests_IsInitialized #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests_IsInitialized_With_2_ClassDataSources__InitializableClass_InitializableClass_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests_IsInitialized_With_2_ClassDataSources__InitializableClass_InitializableClass_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -422,6 +476,24 @@ internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests_IsInitialized yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ClassDataSourceDrivenTests.IsInitialized_With_2_ClassDataSources", + ClassName = "ClassDataSourceDrivenTests", + MethodName = "IsInitialized_With_2_ClassDataSources", + FullyQualifiedName = "TUnit.TestProject.ClassDataSourceDrivenTests.IsInitialized_With_2_ClassDataSources", + FilePath = @"", + LineNumber = 30, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ClassDataSourceDrivenTests_IsInitialized_With_2_ClassDataSources__InitializableClass_InitializableClass_ModuleInitializer { @@ -440,7 +512,7 @@ internal static class TUnit_TestProject_ClassDataSourceDrivenTests_IsInitialized #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests_IsInitialized_With_3_ClassDataSources__InitializableClass_InitializableClass_InitializableClass_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests_IsInitialized_With_3_ClassDataSources__InitializableClass_InitializableClass_InitializableClass_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -543,6 +615,24 @@ internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests_IsInitialized yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ClassDataSourceDrivenTests.IsInitialized_With_3_ClassDataSources", + ClassName = "ClassDataSourceDrivenTests", + MethodName = "IsInitialized_With_3_ClassDataSources", + FullyQualifiedName = "TUnit.TestProject.ClassDataSourceDrivenTests.IsInitialized_With_3_ClassDataSources", + FilePath = @"", + LineNumber = 38, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ClassDataSourceDrivenTests_IsInitialized_With_3_ClassDataSources__InitializableClass_InitializableClass_InitializableClass_ModuleInitializer { @@ -561,7 +651,7 @@ internal static class TUnit_TestProject_ClassDataSourceDrivenTests_IsInitialized #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests_IsInitialized_With_4_ClassDataSources__InitializableClass_InitializableClass_InitializableClass_InitializableClass_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests_IsInitialized_With_4_ClassDataSources__InitializableClass_InitializableClass_InitializableClass_InitializableClass_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -671,6 +761,24 @@ internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests_IsInitialized yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ClassDataSourceDrivenTests.IsInitialized_With_4_ClassDataSources", + ClassName = "ClassDataSourceDrivenTests", + MethodName = "IsInitialized_With_4_ClassDataSources", + FullyQualifiedName = "TUnit.TestProject.ClassDataSourceDrivenTests.IsInitialized_With_4_ClassDataSources", + FilePath = @"", + LineNumber = 47, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ClassDataSourceDrivenTests_IsInitialized_With_4_ClassDataSources__InitializableClass_InitializableClass_InitializableClass_InitializableClass_ModuleInitializer { @@ -689,7 +797,7 @@ internal static class TUnit_TestProject_ClassDataSourceDrivenTests_IsInitialized #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests_IsInitialized_With_5_ClassDataSources__InitializableClass_InitializableClass_InitializableClass_InitializableClass_InitializableClass_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests_IsInitialized_With_5_ClassDataSources__InitializableClass_InitializableClass_InitializableClass_InitializableClass_InitializableClass_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -806,6 +914,24 @@ internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests_IsInitialized yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ClassDataSourceDrivenTests.IsInitialized_With_5_ClassDataSources", + ClassName = "ClassDataSourceDrivenTests", + MethodName = "IsInitialized_With_5_ClassDataSources", + FullyQualifiedName = "TUnit.TestProject.ClassDataSourceDrivenTests.IsInitialized_With_5_ClassDataSources", + FilePath = @"", + LineNumber = 57, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ClassDataSourceDrivenTests_IsInitialized_With_5_ClassDataSources__InitializableClass_InitializableClass_InitializableClass_InitializableClass_InitializableClass_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests2.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests2.Test.verified.txt index a199ccf933..e4fcb7db17 100644 --- a/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests2.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests2.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests2_Base_Derived1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests2_Base_Derived1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -91,6 +91,24 @@ internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests2_Base_Derived yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ClassDataSourceDrivenTests2.Base_Derived1", + ClassName = "ClassDataSourceDrivenTests2", + MethodName = "Base_Derived1", + FullyQualifiedName = "TUnit.TestProject.ClassDataSourceDrivenTests2.Base_Derived1", + FilePath = @"", + LineNumber = 12, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ClassDataSourceDrivenTests2_Base_Derived1_ModuleInitializer { @@ -109,7 +127,7 @@ internal static class TUnit_TestProject_ClassDataSourceDrivenTests2_Base_Derived #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests2_Base_Derived2_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests2_Base_Derived2_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -197,6 +215,24 @@ internal sealed class TUnit_TestProject_ClassDataSourceDrivenTests2_Base_Derived yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ClassDataSourceDrivenTests2.Base_Derived2", + ClassName = "ClassDataSourceDrivenTests2", + MethodName = "Base_Derived2", + FullyQualifiedName = "TUnit.TestProject.ClassDataSourceDrivenTests2.Base_Derived2", + FilePath = @"", + LineNumber = 18, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ClassDataSourceDrivenTests2_Base_Derived2_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTestsSharedKeyed.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTestsSharedKeyed.Test.verified.txt index 0ed69b261f..1770bbfcce 100644 --- a/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTestsSharedKeyed.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTestsSharedKeyed.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ClassDataSourceDrivenTestsSharedKeyed_DataSource_Class__SomeAsyncDisposableClass_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ClassDataSourceDrivenTestsSharedKeyed_DataSource_Class__SomeAsyncDisposableClass_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -94,6 +94,24 @@ internal sealed class TUnit_TestProject_ClassDataSourceDrivenTestsSharedKeyed_Da yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ClassDataSourceDrivenTestsSharedKeyed.DataSource_Class", + ClassName = "ClassDataSourceDrivenTestsSharedKeyed", + MethodName = "DataSource_Class", + FullyQualifiedName = "TUnit.TestProject.ClassDataSourceDrivenTestsSharedKeyed.DataSource_Class", + FilePath = @"", + LineNumber = 9, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ClassDataSourceDrivenTestsSharedKeyed_DataSource_Class__SomeAsyncDisposableClass_ModuleInitializer { @@ -112,7 +130,7 @@ internal static class TUnit_TestProject_ClassDataSourceDrivenTestsSharedKeyed_Da #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ClassDataSourceDrivenTestsSharedKeyed_DataSource_Class_Generic__SomeAsyncDisposableClass_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ClassDataSourceDrivenTestsSharedKeyed_DataSource_Class_Generic__SomeAsyncDisposableClass_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -203,6 +221,24 @@ internal sealed class TUnit_TestProject_ClassDataSourceDrivenTestsSharedKeyed_Da yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ClassDataSourceDrivenTestsSharedKeyed.DataSource_Class_Generic", + ClassName = "ClassDataSourceDrivenTestsSharedKeyed", + MethodName = "DataSource_Class_Generic", + FullyQualifiedName = "TUnit.TestProject.ClassDataSourceDrivenTestsSharedKeyed.DataSource_Class_Generic", + FilePath = @"", + LineNumber = 16, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ClassDataSourceDrivenTestsSharedKeyed_DataSource_Class_Generic__SomeAsyncDisposableClass_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/ClassTupleDataSourceDrivenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ClassTupleDataSourceDrivenTests.Test.verified.txt index d5dd55b3e5..bf253c7a81 100644 --- a/TUnit.Core.SourceGenerator.Tests/ClassTupleDataSourceDrivenTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ClassTupleDataSourceDrivenTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ClassTupleDataSourceDrivenTests_DataSource_TupleMethod__int_string_bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ClassTupleDataSourceDrivenTests_DataSource_TupleMethod__int_string_bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { #if NET8_0_OR_GREATER [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "k__BackingField")] @@ -382,6 +382,24 @@ internal sealed class TUnit_TestProject_ClassTupleDataSourceDrivenTests_DataSour yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ClassTupleDataSourceDrivenTests.DataSource_TupleMethod", + ClassName = "ClassTupleDataSourceDrivenTests", + MethodName = "DataSource_TupleMethod", + FullyQualifiedName = "TUnit.TestProject.ClassTupleDataSourceDrivenTests.DataSource_TupleMethod", + FilePath = @"", + LineNumber = 27, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ClassTupleDataSourceDrivenTests_DataSource_TupleMethod__int_string_bool_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/ConcreteClassTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConcreteClassTests.Test.verified.txt index fdd9b1edda..1ea0f8ba88 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConcreteClassTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConcreteClassTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_SecondTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_SecondTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -74,6 +74,24 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_SecondTest_ yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.AbstractTests.ConcreteClass2.SecondTest", + ClassName = "ConcreteClass2", + MethodName = "SecondTest", + FullyQualifiedName = "TUnit.TestProject.AbstractTests.ConcreteClass2.SecondTest", + FilePath = @"", + LineNumber = 11, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_AbstractTests_ConcreteClass2_SecondTest_ModuleInitializer { @@ -92,7 +110,7 @@ internal static class TUnit_TestProject_AbstractTests_ConcreteClass2_SecondTest_ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClassName_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClassName_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -162,6 +180,24 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClass yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.AbstractTests.ConcreteClass2.AssertClassName", + ClassName = "ConcreteClass2", + MethodName = "AssertClassName", + FullyQualifiedName = "TUnit.TestProject.AbstractTests.ConcreteClass2.AssertClassName", + FilePath = @"", + LineNumber = 3, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClassName_ModuleInitializer { @@ -180,7 +216,7 @@ internal static class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClass #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -249,6 +285,24 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClass yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.AbstractTests.ConcreteClass1.AssertClassName", + ClassName = "ConcreteClass1", + MethodName = "AssertClassName", + FullyQualifiedName = "TUnit.TestProject.AbstractTests.ConcreteClass1.AssertClassName", + FilePath = @"", + LineNumber = 3, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/ConstantArgumentsTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConstantArgumentsTests.Test.verified.txt index 1f18d3968c..a591376308 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConstantArgumentsTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConstantArgumentsTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ConstantArgumentsTests_String1__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ConstantArgumentsTests_String1__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -92,6 +92,24 @@ internal sealed class TUnit_TestProject_ConstantArgumentsTests_String1__string_T yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ConstantArgumentsTests.String1", + ClassName = "ConstantArgumentsTests", + MethodName = "String1", + FullyQualifiedName = "TUnit.TestProject.ConstantArgumentsTests.String1", + FilePath = @"", + LineNumber = 16, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ConstantArgumentsTests_String1__string_ModuleInitializer { @@ -110,7 +128,7 @@ internal static class TUnit_TestProject_ConstantArgumentsTests_String1__string_M #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ConstantArgumentsTests_Int__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ConstantArgumentsTests_Int__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -199,6 +217,24 @@ internal sealed class TUnit_TestProject_ConstantArgumentsTests_Int__int_TestSour yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ConstantArgumentsTests.Int", + ClassName = "ConstantArgumentsTests", + MethodName = "Int", + FullyQualifiedName = "TUnit.TestProject.ConstantArgumentsTests.Int", + FilePath = @"", + LineNumber = 23, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ConstantArgumentsTests_Int__int_ModuleInitializer { @@ -217,7 +253,7 @@ internal static class TUnit_TestProject_ConstantArgumentsTests_Int__int_ModuleIn #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ConstantArgumentsTests_Double__double_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ConstantArgumentsTests_Double__double_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -306,6 +342,24 @@ internal sealed class TUnit_TestProject_ConstantArgumentsTests_Double__double_Te yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ConstantArgumentsTests.Double", + ClassName = "ConstantArgumentsTests", + MethodName = "Double", + FullyQualifiedName = "TUnit.TestProject.ConstantArgumentsTests.Double", + FilePath = @"", + LineNumber = 30, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ConstantArgumentsTests_Double__double_ModuleInitializer { @@ -324,7 +378,7 @@ internal static class TUnit_TestProject_ConstantArgumentsTests_Double__double_Mo #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ConstantArgumentsTests_Float__float_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ConstantArgumentsTests_Float__float_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -413,6 +467,24 @@ internal sealed class TUnit_TestProject_ConstantArgumentsTests_Float__float_Test yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ConstantArgumentsTests.Float", + ClassName = "ConstantArgumentsTests", + MethodName = "Float", + FullyQualifiedName = "TUnit.TestProject.ConstantArgumentsTests.Float", + FilePath = @"", + LineNumber = 37, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ConstantArgumentsTests_Float__float_ModuleInitializer { @@ -431,7 +503,7 @@ internal static class TUnit_TestProject_ConstantArgumentsTests_Float__float_Modu #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ConstantArgumentsTests_Long__long_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ConstantArgumentsTests_Long__long_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -520,6 +592,24 @@ internal sealed class TUnit_TestProject_ConstantArgumentsTests_Long__long_TestSo yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ConstantArgumentsTests.Long", + ClassName = "ConstantArgumentsTests", + MethodName = "Long", + FullyQualifiedName = "TUnit.TestProject.ConstantArgumentsTests.Long", + FilePath = @"", + LineNumber = 44, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ConstantArgumentsTests_Long__long_ModuleInitializer { @@ -538,7 +628,7 @@ internal static class TUnit_TestProject_ConstantArgumentsTests_Long__long_Module #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ConstantArgumentsTests_UInt__uint_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ConstantArgumentsTests_UInt__uint_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -627,6 +717,24 @@ internal sealed class TUnit_TestProject_ConstantArgumentsTests_UInt__uint_TestSo yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ConstantArgumentsTests.UInt", + ClassName = "ConstantArgumentsTests", + MethodName = "UInt", + FullyQualifiedName = "TUnit.TestProject.ConstantArgumentsTests.UInt", + FilePath = @"", + LineNumber = 51, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ConstantArgumentsTests_UInt__uint_ModuleInitializer { @@ -645,7 +753,7 @@ internal static class TUnit_TestProject_ConstantArgumentsTests_UInt__uint_Module #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ConstantArgumentsTests_ULong__ulong_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ConstantArgumentsTests_ULong__ulong_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -734,6 +842,24 @@ internal sealed class TUnit_TestProject_ConstantArgumentsTests_ULong__ulong_Test yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ConstantArgumentsTests.ULong", + ClassName = "ConstantArgumentsTests", + MethodName = "ULong", + FullyQualifiedName = "TUnit.TestProject.ConstantArgumentsTests.ULong", + FilePath = @"", + LineNumber = 58, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ConstantArgumentsTests_ULong__ulong_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/ConstantInBaseClassTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConstantInBaseClassTests.Test.verified.txt index 823766c246..d9d836eec7 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConstantInBaseClassTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConstantInBaseClassTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1432_ConstantInBaseClassTests_SomeTest__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1432_ConstantInBaseClassTests_SomeTest__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -92,6 +92,24 @@ internal sealed class TUnit_TestProject_Bugs__1432_ConstantInBaseClassTests_Some yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1432.ConstantInBaseClassTests.SomeTest", + ClassName = "ConstantInBaseClassTests", + MethodName = "SomeTest", + FullyQualifiedName = "TUnit.TestProject.Bugs._1432.ConstantInBaseClassTests.SomeTest", + FilePath = @"", + LineNumber = 13, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1432_ConstantInBaseClassTests_SomeTest__string_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/ConstantsInInterpolatedStringsTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConstantsInInterpolatedStringsTests.Test.verified.txt index 640e00c2d5..1a5cdcc24f 100644 --- a/TUnit.Core.SourceGenerator.Tests/ConstantsInInterpolatedStringsTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ConstantsInInterpolatedStringsTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1432_ConstantsInInterpolatedStringsTests_SomeTest__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1432_ConstantsInInterpolatedStringsTests_SomeTest__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -92,6 +92,24 @@ internal sealed class TUnit_TestProject_Bugs__1432_ConstantsInInterpolatedString yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1432.ConstantsInInterpolatedStringsTests.SomeTest", + ClassName = "ConstantsInInterpolatedStringsTests", + MethodName = "SomeTest", + FullyQualifiedName = "TUnit.TestProject.Bugs._1432.ConstantsInInterpolatedStringsTests.SomeTest", + FilePath = @"", + LineNumber = 13, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1432_ConstantsInInterpolatedStringsTests_SomeTest__string_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/CustomDisplayNameTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/CustomDisplayNameTests.Test.verified.txt index f5b91c08ec..1598957d58 100644 --- a/TUnit.Core.SourceGenerator.Tests/CustomDisplayNameTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/CustomDisplayNameTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_CustomDisplayNameTests_Test_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_CustomDisplayNameTests_Test_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -86,6 +86,24 @@ internal sealed class TUnit_TestProject_CustomDisplayNameTests_Test_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.CustomDisplayNameTests.Test", + ClassName = "CustomDisplayNameTests", + MethodName = "Test", + FullyQualifiedName = "TUnit.TestProject.CustomDisplayNameTests.Test", + FilePath = @"", + LineNumber = 11, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_CustomDisplayNameTests_Test_ModuleInitializer { @@ -104,7 +122,7 @@ internal static class TUnit_TestProject_CustomDisplayNameTests_Test_ModuleInitia #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_CustomDisplayNameTests_Test2_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_CustomDisplayNameTests_Test2_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -187,6 +205,24 @@ internal sealed class TUnit_TestProject_CustomDisplayNameTests_Test2_TestSource yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.CustomDisplayNameTests.Test2", + ClassName = "CustomDisplayNameTests", + MethodName = "Test2", + FullyQualifiedName = "TUnit.TestProject.CustomDisplayNameTests.Test2", + FilePath = @"", + LineNumber = 18, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_CustomDisplayNameTests_Test2_ModuleInitializer { @@ -205,7 +241,7 @@ internal static class TUnit_TestProject_CustomDisplayNameTests_Test2_ModuleIniti #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_CustomDisplayNameTests_Test3__string_int_bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_CustomDisplayNameTests_Test3__string_int_bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -323,6 +359,24 @@ internal sealed class TUnit_TestProject_CustomDisplayNameTests_Test3__string_int yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.CustomDisplayNameTests.Test3", + ClassName = "CustomDisplayNameTests", + MethodName = "Test3", + FullyQualifiedName = "TUnit.TestProject.CustomDisplayNameTests.Test3", + FilePath = @"", + LineNumber = 25, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_CustomDisplayNameTests_Test3__string_int_bool_ModuleInitializer { @@ -341,7 +395,7 @@ internal static class TUnit_TestProject_CustomDisplayNameTests_Test3__string_int #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_CustomDisplayNameTests_MethodDataSourceTest__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_CustomDisplayNameTests_MethodDataSourceTest__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -455,6 +509,24 @@ internal sealed class TUnit_TestProject_CustomDisplayNameTests_MethodDataSourceT yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.CustomDisplayNameTests.MethodDataSourceTest", + ClassName = "CustomDisplayNameTests", + MethodName = "MethodDataSourceTest", + FullyQualifiedName = "TUnit.TestProject.CustomDisplayNameTests.MethodDataSourceTest", + FilePath = @"", + LineNumber = 37, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_CustomDisplayNameTests_MethodDataSourceTest__string_ModuleInitializer { @@ -473,7 +545,7 @@ internal static class TUnit_TestProject_CustomDisplayNameTests_MethodDataSourceT #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_CustomDisplayNameTests_TestParameterNamePrefixBug__int_string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_CustomDisplayNameTests_TestParameterNamePrefixBug__int_string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -585,6 +657,24 @@ internal sealed class TUnit_TestProject_CustomDisplayNameTests_TestParameterName yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.CustomDisplayNameTests.TestParameterNamePrefixBug", + ClassName = "CustomDisplayNameTests", + MethodName = "TestParameterNamePrefixBug", + FullyQualifiedName = "TUnit.TestProject.CustomDisplayNameTests.TestParameterNamePrefixBug", + FilePath = @"", + LineNumber = 45, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_CustomDisplayNameTests_TestParameterNamePrefixBug__int_string_ModuleInitializer { @@ -603,7 +693,7 @@ internal static class TUnit_TestProject_CustomDisplayNameTests_TestParameterName #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_CustomDisplayNameTests_PasswordTest__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_CustomDisplayNameTests_PasswordTest__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -705,6 +795,24 @@ internal sealed class TUnit_TestProject_CustomDisplayNameTests_PasswordTest__str yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.CustomDisplayNameTests.PasswordTest", + ClassName = "CustomDisplayNameTests", + MethodName = "PasswordTest", + FullyQualifiedName = "TUnit.TestProject.CustomDisplayNameTests.PasswordTest", + FilePath = @"", + LineNumber = 65, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_CustomDisplayNameTests_PasswordTest__string_ModuleInitializer { @@ -723,7 +831,7 @@ internal static class TUnit_TestProject_CustomDisplayNameTests_PasswordTest__str #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_CustomDisplayNameTests_SameClassConstantTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_CustomDisplayNameTests_SameClassConstantTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -806,6 +914,24 @@ internal sealed class TUnit_TestProject_CustomDisplayNameTests_SameClassConstant yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.CustomDisplayNameTests.SameClassConstantTest", + ClassName = "CustomDisplayNameTests", + MethodName = "SameClassConstantTest", + FullyQualifiedName = "TUnit.TestProject.CustomDisplayNameTests.SameClassConstantTest", + FilePath = @"", + LineNumber = 72, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_CustomDisplayNameTests_SameClassConstantTest_ModuleInitializer { @@ -824,7 +950,7 @@ internal static class TUnit_TestProject_CustomDisplayNameTests_SameClassConstant #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_CustomDisplayNameTests_DifferentClassConstantTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_CustomDisplayNameTests_DifferentClassConstantTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -907,6 +1033,24 @@ internal sealed class TUnit_TestProject_CustomDisplayNameTests_DifferentClassCon yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.CustomDisplayNameTests.DifferentClassConstantTest", + ClassName = "CustomDisplayNameTests", + MethodName = "DifferentClassConstantTest", + FullyQualifiedName = "TUnit.TestProject.CustomDisplayNameTests.DifferentClassConstantTest", + FilePath = @"", + LineNumber = 79, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_CustomDisplayNameTests_DifferentClassConstantTest_ModuleInitializer { @@ -925,7 +1069,7 @@ internal static class TUnit_TestProject_CustomDisplayNameTests_DifferentClassCon #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_CustomDisplayNameTests_NestedClassConstantTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_CustomDisplayNameTests_NestedClassConstantTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1008,6 +1152,24 @@ internal sealed class TUnit_TestProject_CustomDisplayNameTests_NestedClassConsta yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.CustomDisplayNameTests.NestedClassConstantTest", + ClassName = "CustomDisplayNameTests", + MethodName = "NestedClassConstantTest", + FullyQualifiedName = "TUnit.TestProject.CustomDisplayNameTests.NestedClassConstantTest", + FilePath = @"", + LineNumber = 86, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_CustomDisplayNameTests_NestedClassConstantTest_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/DataDrivenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/DataDrivenTests.Test.verified.txt index 75c55bca72..a3d503175c 100644 --- a/TUnit.Core.SourceGenerator.Tests/DataDrivenTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/DataDrivenTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DataDrivenTests_DataSource_Method__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DataDrivenTests_DataSource_Method__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -95,6 +95,24 @@ internal sealed class TUnit_TestProject_DataDrivenTests_DataSource_Method__int_T yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DataDrivenTests.DataSource_Method", + ClassName = "DataDrivenTests", + MethodName = "DataSource_Method", + FullyQualifiedName = "TUnit.TestProject.DataDrivenTests.DataSource_Method", + FilePath = @"", + LineNumber = 8, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DataDrivenTests_DataSource_Method__int_ModuleInitializer { @@ -113,7 +131,7 @@ internal static class TUnit_TestProject_DataDrivenTests_DataSource_Method__int_M #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DataDrivenTests_DataSource_Method__int_string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DataDrivenTests_DataSource_Method__int_string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -212,6 +230,24 @@ internal sealed class TUnit_TestProject_DataDrivenTests_DataSource_Method__int_s yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DataDrivenTests.DataSource_Method", + ClassName = "DataDrivenTests", + MethodName = "DataSource_Method", + FullyQualifiedName = "TUnit.TestProject.DataDrivenTests.DataSource_Method", + FilePath = @"", + LineNumber = 17, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DataDrivenTests_DataSource_Method__int_string_ModuleInitializer { @@ -230,7 +266,7 @@ internal static class TUnit_TestProject_DataDrivenTests_DataSource_Method__int_s #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DataDrivenTests_EnumValue__TestEnum_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DataDrivenTests_EnumValue__TestEnum_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -322,6 +358,24 @@ internal sealed class TUnit_TestProject_DataDrivenTests_EnumValue__TestEnum_Test yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DataDrivenTests.EnumValue", + ClassName = "DataDrivenTests", + MethodName = "EnumValue", + FullyQualifiedName = "TUnit.TestProject.DataDrivenTests.EnumValue", + FilePath = @"", + LineNumber = 26, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DataDrivenTests_EnumValue__TestEnum_ModuleInitializer { @@ -340,7 +394,7 @@ internal static class TUnit_TestProject_DataDrivenTests_EnumValue__TestEnum_Modu #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DataDrivenTests_NullValue__string__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DataDrivenTests_NullValue__string__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -430,6 +484,24 @@ internal sealed class TUnit_TestProject_DataDrivenTests_NullValue__string__TestS yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DataDrivenTests.NullValue", + ClassName = "DataDrivenTests", + MethodName = "NullValue", + FullyQualifiedName = "TUnit.TestProject.DataDrivenTests.NullValue", + FilePath = @"", + LineNumber = 35, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DataDrivenTests_NullValue__string__ModuleInitializer { @@ -448,7 +520,7 @@ internal static class TUnit_TestProject_DataDrivenTests_NullValue__string__Modul #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DataDrivenTests_EmptyString__string__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DataDrivenTests_EmptyString__string__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -538,6 +610,24 @@ internal sealed class TUnit_TestProject_DataDrivenTests_EmptyString__string__Tes yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DataDrivenTests.EmptyString", + ClassName = "DataDrivenTests", + MethodName = "EmptyString", + FullyQualifiedName = "TUnit.TestProject.DataDrivenTests.EmptyString", + FilePath = @"", + LineNumber = 42, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DataDrivenTests_EmptyString__string__ModuleInitializer { @@ -556,7 +646,7 @@ internal static class TUnit_TestProject_DataDrivenTests_EmptyString__string__Mod #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DataDrivenTests_NonEmptyString__string__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DataDrivenTests_NonEmptyString__string__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -646,6 +736,24 @@ internal sealed class TUnit_TestProject_DataDrivenTests_NonEmptyString__string__ yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DataDrivenTests.NonEmptyString", + ClassName = "DataDrivenTests", + MethodName = "NonEmptyString", + FullyQualifiedName = "TUnit.TestProject.DataDrivenTests.NonEmptyString", + FilePath = @"", + LineNumber = 49, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DataDrivenTests_NonEmptyString__string__ModuleInitializer { @@ -664,7 +772,7 @@ internal static class TUnit_TestProject_DataDrivenTests_NonEmptyString__string__ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DataDrivenTests_BooleanString__bool__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DataDrivenTests_BooleanString__bool__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -756,6 +864,24 @@ internal sealed class TUnit_TestProject_DataDrivenTests_BooleanString__bool__Tes yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DataDrivenTests.BooleanString", + ClassName = "DataDrivenTests", + MethodName = "BooleanString", + FullyQualifiedName = "TUnit.TestProject.DataDrivenTests.BooleanString", + FilePath = @"", + LineNumber = 56, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DataDrivenTests_BooleanString__bool__ModuleInitializer { @@ -774,7 +900,7 @@ internal static class TUnit_TestProject_DataDrivenTests_BooleanString__bool__Mod #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DataDrivenTests_Type__Type_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DataDrivenTests_Type__Type_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -864,6 +990,24 @@ internal sealed class TUnit_TestProject_DataDrivenTests_Type__Type_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DataDrivenTests.Type", + ClassName = "DataDrivenTests", + MethodName = "Type", + FullyQualifiedName = "TUnit.TestProject.DataDrivenTests.Type", + FilePath = @"", + LineNumber = 65, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DataDrivenTests_Type__Type_ModuleInitializer { @@ -882,7 +1026,7 @@ internal static class TUnit_TestProject_DataDrivenTests_Type__Type_ModuleInitial #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DataDrivenTests_IntegerArray__int___TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DataDrivenTests_IntegerArray__int___TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -972,6 +1116,24 @@ internal sealed class TUnit_TestProject_DataDrivenTests_IntegerArray__int___Test yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DataDrivenTests.IntegerArray", + ClassName = "DataDrivenTests", + MethodName = "IntegerArray", + FullyQualifiedName = "TUnit.TestProject.DataDrivenTests.IntegerArray", + FilePath = @"", + LineNumber = 72, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DataDrivenTests_IntegerArray__int___ModuleInitializer { @@ -990,7 +1152,7 @@ internal static class TUnit_TestProject_DataDrivenTests_IntegerArray__int___Modu #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DataDrivenTests_IntMaxValue__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DataDrivenTests_IntMaxValue__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1080,6 +1242,24 @@ internal sealed class TUnit_TestProject_DataDrivenTests_IntMaxValue__int_TestSou yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DataDrivenTests.IntMaxValue", + ClassName = "DataDrivenTests", + MethodName = "IntMaxValue", + FullyQualifiedName = "TUnit.TestProject.DataDrivenTests.IntMaxValue", + FilePath = @"", + LineNumber = 79, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DataDrivenTests_IntMaxValue__int_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/DataSourceClassCombinedWithDataSourceMethodTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/DataSourceClassCombinedWithDataSourceMethodTests.Test.verified.txt index e7e7b03dce..964a01ceb6 100644 --- a/TUnit.Core.SourceGenerator.Tests/DataSourceClassCombinedWithDataSourceMethodTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/DataSourceClassCombinedWithDataSourceMethodTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DataSourceClassCombinedWithDataSourceMethod_DataSourceClassCombinedWithDataSourceMethodTest__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DataSourceClassCombinedWithDataSourceMethod_DataSourceClassCombinedWithDataSourceMethodTest__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -181,6 +181,24 @@ internal sealed class TUnit_TestProject_DataSourceClassCombinedWithDataSourceMet yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DataSourceClassCombinedWithDataSourceMethod.DataSourceClassCombinedWithDataSourceMethodTest", + ClassName = "DataSourceClassCombinedWithDataSourceMethod", + MethodName = "DataSourceClassCombinedWithDataSourceMethodTest", + FullyQualifiedName = "TUnit.TestProject.DataSourceClassCombinedWithDataSourceMethod.DataSourceClassCombinedWithDataSourceMethodTest", + FilePath = @"", + LineNumber = 13, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DataSourceClassCombinedWithDataSourceMethod_DataSourceClassCombinedWithDataSourceMethodTest__int_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/DataSourceGeneratorTests.Typed.verified.txt b/TUnit.Core.SourceGenerator.Tests/DataSourceGeneratorTests.Typed.verified.txt index 85fe8ddee5..b1a9d18186 100644 --- a/TUnit.Core.SourceGenerator.Tests/DataSourceGeneratorTests.Typed.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/DataSourceGeneratorTests.Typed.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DataSourceGeneratorTests_GeneratedData_Method__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DataSourceGeneratorTests_GeneratedData_Method__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -125,6 +125,24 @@ internal sealed class TUnit_TestProject_DataSourceGeneratorTests_GeneratedData_M yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DataSourceGeneratorTests.GeneratedData_Method", + ClassName = "DataSourceGeneratorTests", + MethodName = "GeneratedData_Method", + FullyQualifiedName = "TUnit.TestProject.DataSourceGeneratorTests.GeneratedData_Method", + FilePath = @"", + LineNumber = 12, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DataSourceGeneratorTests_GeneratedData_Method__int_ModuleInitializer { @@ -143,7 +161,7 @@ internal static class TUnit_TestProject_DataSourceGeneratorTests_GeneratedData_M #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DataSourceGeneratorTests_GeneratedData_Method2__int_string_bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DataSourceGeneratorTests_GeneratedData_Method2__int_string_bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -279,6 +297,24 @@ internal sealed class TUnit_TestProject_DataSourceGeneratorTests_GeneratedData_M yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DataSourceGeneratorTests.GeneratedData_Method2", + ClassName = "DataSourceGeneratorTests", + MethodName = "GeneratedData_Method2", + FullyQualifiedName = "TUnit.TestProject.DataSourceGeneratorTests.GeneratedData_Method2", + FilePath = @"", + LineNumber = 18, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DataSourceGeneratorTests_GeneratedData_Method2__int_string_bool_ModuleInitializer { @@ -297,7 +333,7 @@ internal static class TUnit_TestProject_DataSourceGeneratorTests_GeneratedData_M #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DataSourceGeneratorTests_GeneratedData_Method3__int_string_bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DataSourceGeneratorTests_GeneratedData_Method3__int_string_bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -433,6 +469,24 @@ internal sealed class TUnit_TestProject_DataSourceGeneratorTests_GeneratedData_M yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DataSourceGeneratorTests.GeneratedData_Method3", + ClassName = "DataSourceGeneratorTests", + MethodName = "GeneratedData_Method3", + FullyQualifiedName = "TUnit.TestProject.DataSourceGeneratorTests.GeneratedData_Method3", + FilePath = @"", + LineNumber = 24, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DataSourceGeneratorTests_GeneratedData_Method3__int_string_bool_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/DataSourceGeneratorTests.Untyped.verified.txt b/TUnit.Core.SourceGenerator.Tests/DataSourceGeneratorTests.Untyped.verified.txt index 5a4bbdb52f..2cf8c7f6ad 100644 --- a/TUnit.Core.SourceGenerator.Tests/DataSourceGeneratorTests.Untyped.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/DataSourceGeneratorTests.Untyped.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_AutoDataTests_Test1__string_int_double_bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_AutoDataTests_Test1__string_int_double_bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -112,6 +112,24 @@ internal sealed class TUnit_TestProject_AutoDataTests_Test1__string_int_double_b yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.AutoDataTests.Test1", + ClassName = "AutoDataTests", + MethodName = "Test1", + FullyQualifiedName = "TUnit.TestProject.AutoDataTests.Test1", + FilePath = @"", + LineNumber = 7, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_AutoDataTests_Test1__string_int_double_bool_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/DecimalArgumentTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/DecimalArgumentTests.Test.verified.txt index f10cb90061..87e3694729 100644 --- a/TUnit.Core.SourceGenerator.Tests/DecimalArgumentTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/DecimalArgumentTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DecimalArgumentTests_Transfer__decimal_decimal_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DecimalArgumentTests_Transfer__decimal_decimal_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -101,6 +101,24 @@ internal sealed class TUnit_TestProject_DecimalArgumentTests_Transfer__decimal_d yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DecimalArgumentTests.Transfer", + ClassName = "DecimalArgumentTests", + MethodName = "Transfer", + FullyQualifiedName = "TUnit.TestProject.DecimalArgumentTests.Transfer", + FilePath = @"", + LineNumber = 9, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DecimalArgumentTests_Transfer__decimal_decimal_ModuleInitializer { @@ -119,7 +137,7 @@ internal static class TUnit_TestProject_DecimalArgumentTests_Transfer__decimal_d #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DecimalArgumentTests_SimpleDecimal__decimal_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DecimalArgumentTests_SimpleDecimal__decimal_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -208,6 +226,24 @@ internal sealed class TUnit_TestProject_DecimalArgumentTests_SimpleDecimal__deci yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DecimalArgumentTests.SimpleDecimal", + ClassName = "DecimalArgumentTests", + MethodName = "SimpleDecimal", + FullyQualifiedName = "TUnit.TestProject.DecimalArgumentTests.SimpleDecimal", + FilePath = @"", + LineNumber = 29, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DecimalArgumentTests_SimpleDecimal__decimal_ModuleInitializer { @@ -226,7 +262,7 @@ internal static class TUnit_TestProject_DecimalArgumentTests_SimpleDecimal__deci #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DecimalArgumentTests_SmallDecimal__decimal_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DecimalArgumentTests_SmallDecimal__decimal_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -315,6 +351,24 @@ internal sealed class TUnit_TestProject_DecimalArgumentTests_SmallDecimal__decim yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DecimalArgumentTests.SmallDecimal", + ClassName = "DecimalArgumentTests", + MethodName = "SmallDecimal", + FullyQualifiedName = "TUnit.TestProject.DecimalArgumentTests.SmallDecimal", + FilePath = @"", + LineNumber = 36, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DecimalArgumentTests_SmallDecimal__decimal_ModuleInitializer { @@ -333,7 +387,7 @@ internal static class TUnit_TestProject_DecimalArgumentTests_SmallDecimal__decim #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DecimalArgumentTests_MaxDecimal__decimal_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DecimalArgumentTests_MaxDecimal__decimal_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -422,6 +476,24 @@ internal sealed class TUnit_TestProject_DecimalArgumentTests_MaxDecimal__decimal yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DecimalArgumentTests.MaxDecimal", + ClassName = "DecimalArgumentTests", + MethodName = "MaxDecimal", + FullyQualifiedName = "TUnit.TestProject.DecimalArgumentTests.MaxDecimal", + FilePath = @"", + LineNumber = 43, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DecimalArgumentTests_MaxDecimal__decimal_ModuleInitializer { @@ -440,7 +512,7 @@ internal static class TUnit_TestProject_DecimalArgumentTests_MaxDecimal__decimal #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DecimalArgumentTests_MinDecimal__decimal_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DecimalArgumentTests_MinDecimal__decimal_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -529,6 +601,24 @@ internal sealed class TUnit_TestProject_DecimalArgumentTests_MinDecimal__decimal yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DecimalArgumentTests.MinDecimal", + ClassName = "DecimalArgumentTests", + MethodName = "MinDecimal", + FullyQualifiedName = "TUnit.TestProject.DecimalArgumentTests.MinDecimal", + FilePath = @"", + LineNumber = 50, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DecimalArgumentTests_MinDecimal__decimal_ModuleInitializer { @@ -547,7 +637,7 @@ internal static class TUnit_TestProject_DecimalArgumentTests_MinDecimal__decimal #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DecimalArgumentTests_ExplicitDecimalValue__decimal_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DecimalArgumentTests_ExplicitDecimalValue__decimal_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -636,6 +726,24 @@ internal sealed class TUnit_TestProject_DecimalArgumentTests_ExplicitDecimalValu yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DecimalArgumentTests.ExplicitDecimalValue", + ClassName = "DecimalArgumentTests", + MethodName = "ExplicitDecimalValue", + FullyQualifiedName = "TUnit.TestProject.DecimalArgumentTests.ExplicitDecimalValue", + FilePath = @"", + LineNumber = 57, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DecimalArgumentTests_ExplicitDecimalValue__decimal_ModuleInitializer { @@ -654,7 +762,7 @@ internal static class TUnit_TestProject_DecimalArgumentTests_ExplicitDecimalValu #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DecimalArgumentTests_MultipleDecimals__decimal_decimal_decimal_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DecimalArgumentTests_MultipleDecimals__decimal_decimal_decimal_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -757,6 +865,24 @@ internal sealed class TUnit_TestProject_DecimalArgumentTests_MultipleDecimals__d yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DecimalArgumentTests.MultipleDecimals", + ClassName = "DecimalArgumentTests", + MethodName = "MultipleDecimals", + FullyQualifiedName = "TUnit.TestProject.DecimalArgumentTests.MultipleDecimals", + FilePath = @"", + LineNumber = 64, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DecimalArgumentTests_MultipleDecimals__decimal_decimal_decimal_ModuleInitializer { @@ -775,7 +901,7 @@ internal static class TUnit_TestProject_DecimalArgumentTests_MultipleDecimals__d #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DecimalArgumentTests_Test__decimal_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DecimalArgumentTests_Test__decimal_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -867,6 +993,24 @@ internal sealed class TUnit_TestProject_DecimalArgumentTests_Test__decimal_TestS yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DecimalArgumentTests.Test", + ClassName = "DecimalArgumentTests", + MethodName = "Test", + FullyQualifiedName = "TUnit.TestProject.DecimalArgumentTests.Test", + FilePath = @"", + LineNumber = 73, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DecimalArgumentTests_Test__decimal_ModuleInitializer { @@ -885,7 +1029,7 @@ internal static class TUnit_TestProject_DecimalArgumentTests_Test__decimal_Modul #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DecimalArgumentTests_TransactionDiscountCalculations__decimal_decimal_decimal_decimal_decimal_bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DecimalArgumentTests_TransactionDiscountCalculations__decimal_decimal_decimal_decimal_decimal_bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1012,6 +1156,24 @@ internal sealed class TUnit_TestProject_DecimalArgumentTests_TransactionDiscount yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DecimalArgumentTests.TransactionDiscountCalculations", + ClassName = "DecimalArgumentTests", + MethodName = "TransactionDiscountCalculations", + FullyQualifiedName = "TUnit.TestProject.DecimalArgumentTests.TransactionDiscountCalculations", + FilePath = @"", + LineNumber = 82, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DecimalArgumentTests_TransactionDiscountCalculations__decimal_decimal_decimal_decimal_decimal_bool_ModuleInitializer { @@ -1030,7 +1192,7 @@ internal static class TUnit_TestProject_DecimalArgumentTests_TransactionDiscount #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DecimalArgumentTests_Equality3__decimal_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DecimalArgumentTests_Equality3__decimal_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1119,6 +1281,24 @@ internal sealed class TUnit_TestProject_DecimalArgumentTests_Equality3__decimal_ yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DecimalArgumentTests.Equality3", + ClassName = "DecimalArgumentTests", + MethodName = "Equality3", + FullyQualifiedName = "TUnit.TestProject.DecimalArgumentTests.Equality3", + FilePath = @"", + LineNumber = 91, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DecimalArgumentTests_Equality3__decimal_ModuleInitializer { @@ -1137,7 +1317,7 @@ internal static class TUnit_TestProject_DecimalArgumentTests_Equality3__decimal_ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DecimalArgumentTests_Equality4__decimal_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DecimalArgumentTests_Equality4__decimal_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1226,6 +1406,24 @@ internal sealed class TUnit_TestProject_DecimalArgumentTests_Equality4__decimal_ yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DecimalArgumentTests.Equality4", + ClassName = "DecimalArgumentTests", + MethodName = "Equality4", + FullyQualifiedName = "TUnit.TestProject.DecimalArgumentTests.Equality4", + FilePath = @"", + LineNumber = 104, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DecimalArgumentTests_Equality4__decimal_ModuleInitializer { @@ -1244,7 +1442,7 @@ internal static class TUnit_TestProject_DecimalArgumentTests_Equality4__decimal_ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_DecimalArgumentTests_TestMethod__decimal_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_DecimalArgumentTests_TestMethod__decimal_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1333,6 +1531,24 @@ internal sealed class TUnit_TestProject_DecimalArgumentTests_TestMethod__decimal yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.DecimalArgumentTests.TestMethod", + ClassName = "DecimalArgumentTests", + MethodName = "TestMethod", + FullyQualifiedName = "TUnit.TestProject.DecimalArgumentTests.TestMethod", + FilePath = @"", + LineNumber = 119, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_DecimalArgumentTests_TestMethod__decimal_ModuleInitializer { 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 c8a67d8392..f494ba5ce8 100644 --- a/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet10_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet10_0.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -72,6 +72,24 @@ internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.SynchronousTest", + ClassName = "BasicTests", + MethodName = "SynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.SynchronousTest", + FilePath = @"", + LineNumber = 5, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_SynchronousTest_ModuleInitializer { @@ -90,7 +108,7 @@ internal static class TUnit_TestProject_BasicTests_SynchronousTest_ModuleInitial #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -158,6 +176,24 @@ internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.AsynchronousTest", + ClassName = "BasicTests", + MethodName = "AsynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.AsynchronousTest", + FilePath = @"", + LineNumber = 11, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_AsynchronousTest_ModuleInitializer { @@ -176,7 +212,7 @@ internal static class TUnit_TestProject_BasicTests_AsynchronousTest_ModuleInitia #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -244,6 +280,24 @@ internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_Tes yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", + ClassName = "BasicTests", + MethodName = "ValueTaskAsynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", + FilePath = @"", + LineNumber = 17, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_ModuleInitializer { 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 c8a67d8392..f494ba5ce8 100644 --- a/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet8_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet8_0.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -72,6 +72,24 @@ internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.SynchronousTest", + ClassName = "BasicTests", + MethodName = "SynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.SynchronousTest", + FilePath = @"", + LineNumber = 5, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_SynchronousTest_ModuleInitializer { @@ -90,7 +108,7 @@ internal static class TUnit_TestProject_BasicTests_SynchronousTest_ModuleInitial #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -158,6 +176,24 @@ internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.AsynchronousTest", + ClassName = "BasicTests", + MethodName = "AsynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.AsynchronousTest", + FilePath = @"", + LineNumber = 11, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_AsynchronousTest_ModuleInitializer { @@ -176,7 +212,7 @@ internal static class TUnit_TestProject_BasicTests_AsynchronousTest_ModuleInitia #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -244,6 +280,24 @@ internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_Tes yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", + ClassName = "BasicTests", + MethodName = "ValueTaskAsynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", + FilePath = @"", + LineNumber = 17, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_ModuleInitializer { 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 c8a67d8392..f494ba5ce8 100644 --- a/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet9_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.DotNet9_0.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -72,6 +72,24 @@ internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.SynchronousTest", + ClassName = "BasicTests", + MethodName = "SynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.SynchronousTest", + FilePath = @"", + LineNumber = 5, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_SynchronousTest_ModuleInitializer { @@ -90,7 +108,7 @@ internal static class TUnit_TestProject_BasicTests_SynchronousTest_ModuleInitial #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -158,6 +176,24 @@ internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.AsynchronousTest", + ClassName = "BasicTests", + MethodName = "AsynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.AsynchronousTest", + FilePath = @"", + LineNumber = 11, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_AsynchronousTest_ModuleInitializer { @@ -176,7 +212,7 @@ internal static class TUnit_TestProject_BasicTests_AsynchronousTest_ModuleInitia #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -244,6 +280,24 @@ internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_Tes yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", + ClassName = "BasicTests", + MethodName = "ValueTaskAsynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", + FilePath = @"", + LineNumber = 17, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_ModuleInitializer { 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 f5b2d3d7d7..c24216fbe3 100644 --- a/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.Net4_7.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.Net4_7.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -72,6 +72,24 @@ internal sealed class TUnit_TestProject_BasicTests_SynchronousTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.SynchronousTest", + ClassName = "BasicTests", + MethodName = "SynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.SynchronousTest", + FilePath = @"", + LineNumber = 5, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_SynchronousTest_ModuleInitializer { @@ -90,7 +108,7 @@ internal static class TUnit_TestProject_BasicTests_SynchronousTest_ModuleInitial #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -158,6 +176,24 @@ internal sealed class TUnit_TestProject_BasicTests_AsynchronousTest_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.AsynchronousTest", + ClassName = "BasicTests", + MethodName = "AsynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.AsynchronousTest", + FilePath = @"", + LineNumber = 11, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_AsynchronousTest_ModuleInitializer { @@ -176,7 +212,7 @@ internal static class TUnit_TestProject_BasicTests_AsynchronousTest_ModuleInitia #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -244,6 +280,24 @@ internal sealed class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_Tes yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", + ClassName = "BasicTests", + MethodName = "ValueTaskAsynchronousTest", + FullyQualifiedName = "TUnit.TestProject.BasicTests.ValueTaskAsynchronousTest", + FilePath = @"", + LineNumber = 17, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_BasicTests_ValueTaskAsynchronousTest_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/EnumMemberNamesTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/EnumMemberNamesTests.Test.verified.txt index 208b4be63b..4d3c92c565 100644 --- a/TUnit.Core.SourceGenerator.Tests/EnumMemberNamesTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/EnumMemberNamesTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1432_EnumMemberNamesTests_SomeTest__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1432_EnumMemberNamesTests_SomeTest__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -95,6 +95,24 @@ internal sealed class TUnit_TestProject_Bugs__1432_EnumMemberNamesTests_SomeTest yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1432.EnumMemberNamesTests.SomeTest", + ClassName = "EnumMemberNamesTests", + MethodName = "SomeTest", + FullyQualifiedName = "TUnit.TestProject.Bugs._1432.EnumMemberNamesTests.SomeTest", + FilePath = @"", + LineNumber = 8, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1432_EnumMemberNamesTests_SomeTest__string_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/EnumerableDataSourceDrivenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/EnumerableDataSourceDrivenTests.Test.verified.txt index 1dbabb774a..29b86f897e 100644 --- a/TUnit.Core.SourceGenerator.Tests/EnumerableDataSourceDrivenTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/EnumerableDataSourceDrivenTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_EnumerableDataSourceDrivenTests_DataSource_Method__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_EnumerableDataSourceDrivenTests_DataSource_Method__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -113,6 +113,24 @@ internal sealed class TUnit_TestProject_EnumerableDataSourceDrivenTests_DataSour yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.EnumerableDataSourceDrivenTests.DataSource_Method", + ClassName = "EnumerableDataSourceDrivenTests", + MethodName = "DataSource_Method", + FullyQualifiedName = "TUnit.TestProject.EnumerableDataSourceDrivenTests.DataSource_Method", + FilePath = @"", + LineNumber = 8, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_EnumerableDataSourceDrivenTests_DataSource_Method__int_ModuleInitializer { @@ -131,7 +149,7 @@ internal static class TUnit_TestProject_EnumerableDataSourceDrivenTests_DataSour #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_EnumerableDataSourceDrivenTests_DataSource_Method2__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_EnumerableDataSourceDrivenTests_DataSource_Method2__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -241,6 +259,24 @@ internal sealed class TUnit_TestProject_EnumerableDataSourceDrivenTests_DataSour yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.EnumerableDataSourceDrivenTests.DataSource_Method2", + ClassName = "EnumerableDataSourceDrivenTests", + MethodName = "DataSource_Method2", + FullyQualifiedName = "TUnit.TestProject.EnumerableDataSourceDrivenTests.DataSource_Method2", + FilePath = @"", + LineNumber = 15, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_EnumerableDataSourceDrivenTests_DataSource_Method2__int_ModuleInitializer { @@ -259,7 +295,7 @@ internal static class TUnit_TestProject_EnumerableDataSourceDrivenTests_DataSour #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_EnumerableDataSourceDrivenTests_DataSource_WithBaseReturn__BaseValue_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_EnumerableDataSourceDrivenTests_DataSource_WithBaseReturn__BaseValue_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -370,6 +406,24 @@ internal sealed class TUnit_TestProject_EnumerableDataSourceDrivenTests_DataSour yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.EnumerableDataSourceDrivenTests.DataSource_WithBaseReturn", + ClassName = "EnumerableDataSourceDrivenTests", + MethodName = "DataSource_WithBaseReturn", + FullyQualifiedName = "TUnit.TestProject.EnumerableDataSourceDrivenTests.DataSource_WithBaseReturn", + FilePath = @"", + LineNumber = 22, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_EnumerableDataSourceDrivenTests_DataSource_WithBaseReturn__BaseValue_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/EnumerableTupleDataSourceDrivenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/EnumerableTupleDataSourceDrivenTests.Test.verified.txt index 798797ad0e..3e8d741bd9 100644 --- a/TUnit.Core.SourceGenerator.Tests/EnumerableTupleDataSourceDrivenTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/EnumerableTupleDataSourceDrivenTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_EnumerableTupleDataSourceDrivenTests_DataSource_TupleMethod__int_string_bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_EnumerableTupleDataSourceDrivenTests_DataSource_TupleMethod__int_string_bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -150,6 +150,24 @@ internal sealed class TUnit_TestProject_EnumerableTupleDataSourceDrivenTests_Dat yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.EnumerableTupleDataSourceDrivenTests.DataSource_TupleMethod", + ClassName = "EnumerableTupleDataSourceDrivenTests", + MethodName = "DataSource_TupleMethod", + FullyQualifiedName = "TUnit.TestProject.EnumerableTupleDataSourceDrivenTests.DataSource_TupleMethod", + FilePath = @"", + LineNumber = 8, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_EnumerableTupleDataSourceDrivenTests_DataSource_TupleMethod__int_string_bool_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/ExpectedArgumentTypeTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ExpectedArgumentTypeTests.Test.verified.txt index d7b8d38a28..2c37603509 100644 --- a/TUnit.Core.SourceGenerator.Tests/ExpectedArgumentTypeTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/ExpectedArgumentTypeTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ExpectedArgumentTypeTests_TypedArguments__object_Type_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ExpectedArgumentTypeTests_TypedArguments__object_Type_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -111,6 +111,24 @@ internal sealed class TUnit_TestProject_ExpectedArgumentTypeTests_TypedArguments yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ExpectedArgumentTypeTests.TypedArguments", + ClassName = "ExpectedArgumentTypeTests", + MethodName = "TypedArguments", + FullyQualifiedName = "TUnit.TestProject.ExpectedArgumentTypeTests.TypedArguments", + FilePath = @"", + LineNumber = 8, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ExpectedArgumentTypeTests_TypedArguments__object_Type_ModuleInitializer { @@ -129,7 +147,7 @@ internal static class TUnit_TestProject_ExpectedArgumentTypeTests_TypedArguments #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ExpectedArgumentTypeTests_EnumTypes__object_Type_Type_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ExpectedArgumentTypeTests_EnumTypes__object_Type_Type_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -239,6 +257,24 @@ internal sealed class TUnit_TestProject_ExpectedArgumentTypeTests_EnumTypes__obj yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ExpectedArgumentTypeTests.EnumTypes", + ClassName = "ExpectedArgumentTypeTests", + MethodName = "EnumTypes", + FullyQualifiedName = "TUnit.TestProject.ExpectedArgumentTypeTests.EnumTypes", + FilePath = @"", + LineNumber = 25, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ExpectedArgumentTypeTests_EnumTypes__object_Type_Type_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/GenericMethodTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/GenericMethodTests.Test.verified.txt index 27c24ace39..c61da657d8 100644 --- a/TUnit.Core.SourceGenerator.Tests/GenericMethodTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/GenericMethodTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_GenericMethodTests_AggregateBy_HasExpectedOutput__IEnumerable_TSource__Func_TSource__TKey__Func_TKey__TAccumulate__Func_TAccumulate__TSource__TAccumulate__IEqualityComparer_TKey___IEnumerable_KeyValuePair_TKey__TAccumulate___TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_GenericMethodTests_AggregateBy_HasExpectedOutput__IEnumerable_TSource__Func_TSource__TKey__Func_TKey__TAccumulate__Func_TAccumulate__TSource__TAccumulate__IEqualityComparer_TKey___IEnumerable_KeyValuePair_TKey__TAccumulate___TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -434,6 +434,24 @@ internal sealed class TUnit_TestProject_GenericMethodTests_AggregateBy_HasExpect yield return genericMetadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.GenericMethodTests.AggregateBy_HasExpectedOutput", + ClassName = "GenericMethodTests", + MethodName = "AggregateBy_HasExpectedOutput", + FullyQualifiedName = "TUnit.TestProject.GenericMethodTests.AggregateBy_HasExpectedOutput", + FilePath = @"", + LineNumber = 8, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_GenericMethodTests_AggregateBy_HasExpectedOutput__IEnumerable_TSource__Func_TSource__TKey__Func_TKey__TAccumulate__Func_TAccumulate__TSource__TAccumulate__IEqualityComparer_TKey___IEnumerable_KeyValuePair_TKey__TAccumulate___ModuleInitializer { 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 2c1596bc85..65214ccb9b 100644 --- a/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_EmptyGenericRegistry_WhenNoGenericsFound.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_EmptyGenericRegistry_WhenNoGenericsFound.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_SimpleTestClass_NonGenericTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_SimpleTestClass_NonGenericTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -72,6 +72,24 @@ internal sealed class TUnit_TestProject_SimpleTestClass_NonGenericTest_TestSourc yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.SimpleTestClass.NonGenericTest", + ClassName = "SimpleTestClass", + MethodName = "NonGenericTest", + FullyQualifiedName = "TUnit.TestProject.SimpleTestClass.NonGenericTest", + FilePath = @"", + LineNumber = 7, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_SimpleTestClass_NonGenericTest_ModuleInitializer { 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 d4b07e0d6f..0cb74a68ef 100644 --- a/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_GenericConstraints_WithInstantiation.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_GenericConstraints_WithInstantiation.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ConstrainedGenericTestClass_T_TestMethod_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ConstrainedGenericTestClass_T_TestMethod_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -213,6 +213,24 @@ internal sealed class TUnit_TestProject_ConstrainedGenericTestClass_T_TestMethod yield return genericMetadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ConstrainedGenericTestClass.TestMethod", + ClassName = "ConstrainedGenericTestClass", + MethodName = "TestMethod", + FullyQualifiedName = "TUnit.TestProject.ConstrainedGenericTestClass.TestMethod", + FilePath = @"", + LineNumber = 10, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ConstrainedGenericTestClass_T_TestMethod_ModuleInitializer { 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 d14b92862b..ac33646341 100644 --- a/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_GenericTestClass_WithExplicitInstantiation.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_GenericTestClass_WithExplicitInstantiation.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_GenericTestClass_T_TestMethod_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_GenericTestClass_T_TestMethod_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -213,6 +213,24 @@ internal sealed class TUnit_TestProject_GenericTestClass_T_TestMethod_TestSource yield return genericMetadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.GenericTestClass.TestMethod", + ClassName = "GenericTestClass", + MethodName = "TestMethod", + FullyQualifiedName = "TUnit.TestProject.GenericTestClass.TestMethod", + FilePath = @"", + LineNumber = 9, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_GenericTestClass_T_TestMethod_ModuleInitializer { 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 7651fbdfec..f4bc9f16fc 100644 --- a/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_GenericTestMethod_WithExplicitInstantiation.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_GenericTestMethod_WithExplicitInstantiation.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_TestClass_GenericTestMethod_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_TestClass_GenericTestMethod_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -209,6 +209,24 @@ internal sealed class TUnit_TestProject_TestClass_GenericTestMethod_TestSource : yield return genericMetadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.TestClass.GenericTestMethod", + ClassName = "TestClass", + MethodName = "GenericTestMethod", + FullyQualifiedName = "TUnit.TestProject.TestClass.GenericTestMethod", + FilePath = @"", + LineNumber = 7, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_TestClass_GenericTestMethod_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_MultipleGenericParameters.verified.txt b/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_MultipleGenericParameters.verified.txt index ecf6ff1e70..49ec3c3d7d 100644 --- a/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_MultipleGenericParameters.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_MultipleGenericParameters.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_MultiGenericTestClass_T1_T2_TestMethod_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_MultiGenericTestClass_T1_T2_TestMethod_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -213,6 +213,24 @@ internal sealed class TUnit_TestProject_MultiGenericTestClass_T1_T2_TestMethod_T yield return genericMetadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.MultiGenericTestClass.TestMethod", + ClassName = "MultiGenericTestClass", + MethodName = "TestMethod", + FullyQualifiedName = "TUnit.TestProject.MultiGenericTestClass.TestMethod", + FilePath = @"", + LineNumber = 9, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_MultiGenericTestClass_T1_T2_TestMethod_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_NestedGenericTypes.verified.txt b/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_NestedGenericTypes.verified.txt index 711d56824e..64bbd34fe7 100644 --- a/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_NestedGenericTypes.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/GenericTypeResolverTests.Test_NestedGenericTypes.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_NestedGenericTestClass_T_TestMethod_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_NestedGenericTestClass_T_TestMethod_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -213,6 +213,24 @@ internal sealed class TUnit_TestProject_NestedGenericTestClass_T_TestMethod_Test yield return genericMetadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.NestedGenericTestClass.TestMethod", + ClassName = "NestedGenericTestClass", + MethodName = "TestMethod", + FullyQualifiedName = "TUnit.TestProject.NestedGenericTestClass.TestMethod", + FilePath = @"", + LineNumber = 10, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_NestedGenericTestClass_T_TestMethod_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/Hooks1589.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Hooks1589.Test.verified.txt index 715c01f082..bf3c007286 100644 --- a/TUnit.Core.SourceGenerator.Tests/Hooks1589.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Hooks1589.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1589_MyTests_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1589_MyTests_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -90,6 +90,24 @@ internal sealed class TUnit_TestProject_Bugs__1589_MyTests_Test1_TestSource : gl yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1589.MyTests.Test1", + ClassName = "MyTests", + MethodName = "Test1", + FullyQualifiedName = "TUnit.TestProject.Bugs._1589.MyTests.Test1", + FilePath = @"", + LineNumber = 15, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1589_MyTests_Test1_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/Hooks1594.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Hooks1594.Test.verified.txt index 9d5d9f0ecd..eabb51929a 100644 --- a/TUnit.Core.SourceGenerator.Tests/Hooks1594.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Hooks1594.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1594_MyTests_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1594_MyTests_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -91,6 +91,24 @@ internal sealed class TUnit_TestProject_Bugs__1594_MyTests_Test1_TestSource : gl yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1594.MyTests.Test1", + ClassName = "MyTests", + MethodName = "Test1", + FullyQualifiedName = "TUnit.TestProject.Bugs._1594.MyTests.Test1", + FilePath = @"", + LineNumber = 15, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1594_MyTests_Test1_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/InheritedPropertySetterTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/InheritedPropertySetterTests.Test.verified.txt index 2612f8d4f3..75519dfe9f 100644 --- a/TUnit.Core.SourceGenerator.Tests/InheritedPropertySetterTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/InheritedPropertySetterTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_PropertySetterTests_Test_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_PropertySetterTests_Test_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { #if NET8_0_OR_GREATER [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "k__BackingField")] @@ -336,6 +336,24 @@ internal sealed class TUnit_TestProject_PropertySetterTests_Test_TestSource : gl yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.PropertySetterTests.Test", + ClassName = "PropertySetterTests", + MethodName = "Test", + FullyQualifiedName = "TUnit.TestProject.PropertySetterTests.Test", + FilePath = @"", + LineNumber = 69, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_PropertySetterTests_Test_ModuleInitializer { @@ -354,7 +372,7 @@ internal static class TUnit_TestProject_PropertySetterTests_Test_ModuleInitializ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_InheritedPropertySetterTests_Test_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_InheritedPropertySetterTests_Test_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { #if NET8_0_OR_GREATER [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "k__BackingField")] @@ -587,6 +605,24 @@ internal sealed class TUnit_TestProject_InheritedPropertySetterTests_Test_TestSo yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.InheritedPropertySetterTests.Test", + ClassName = "InheritedPropertySetterTests", + MethodName = "Test", + FullyQualifiedName = "TUnit.TestProject.InheritedPropertySetterTests.Test", + FilePath = @"", + LineNumber = 3, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_InheritedPropertySetterTests_Test_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/InheritedTestsFromDifferentProjectTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/InheritedTestsFromDifferentProjectTests.Test.verified.txt index 219be38513..175c7fb1c9 100644 --- a/TUnit.Core.SourceGenerator.Tests/InheritedTestsFromDifferentProjectTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/InheritedTestsFromDifferentProjectTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_Test_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_Test_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -75,6 +75,24 @@ internal sealed class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_ yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.InheritedTestsFromDifferentProjectTests.Test", + ClassName = "InheritedTestsFromDifferentProjectTests", + MethodName = "Test", + FullyQualifiedName = "TUnit.TestProject.InheritedTestsFromDifferentProjectTests.Test", + FilePath = @"", + LineNumber = 9, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_Test_ModuleInitializer { @@ -93,7 +111,7 @@ internal static class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_GenericMethodDataSource__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_GenericMethodDataSource__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -185,6 +203,24 @@ internal sealed class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_ yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.InheritedTestsFromDifferentProjectTests.GenericMethodDataSource", + ClassName = "InheritedTestsFromDifferentProjectTests", + MethodName = "GenericMethodDataSource", + FullyQualifiedName = "TUnit.TestProject.InheritedTestsFromDifferentProjectTests.GenericMethodDataSource", + FilePath = @"", + LineNumber = 14, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_GenericMethodDataSource__string_ModuleInitializer { @@ -203,7 +239,7 @@ internal static class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_NonGenericMethodDataSource__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_NonGenericMethodDataSource__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -306,6 +342,24 @@ internal sealed class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_ yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.InheritedTestsFromDifferentProjectTests.NonGenericMethodDataSource", + ClassName = "InheritedTestsFromDifferentProjectTests", + MethodName = "NonGenericMethodDataSource", + FullyQualifiedName = "TUnit.TestProject.InheritedTestsFromDifferentProjectTests.NonGenericMethodDataSource", + FilePath = @"", + LineNumber = 20, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_NonGenericMethodDataSource__string_ModuleInitializer { @@ -324,7 +378,7 @@ internal static class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_VerifyInheritedCategoriesAreAvailable_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_VerifyInheritedCategoriesAreAvailable_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -395,6 +449,24 @@ internal sealed class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_ yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.InheritedTestsFromDifferentProjectTests.VerifyInheritedCategoriesAreAvailable", + ClassName = "InheritedTestsFromDifferentProjectTests", + MethodName = "VerifyInheritedCategoriesAreAvailable", + FullyQualifiedName = "TUnit.TestProject.InheritedTestsFromDifferentProjectTests.VerifyInheritedCategoriesAreAvailable", + FilePath = @"", + LineNumber = 26, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_VerifyInheritedCategoriesAreAvailable_ModuleInitializer { @@ -413,7 +485,7 @@ internal static class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_BaseTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_BaseTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -486,6 +558,24 @@ internal sealed class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_ yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.InheritedTestsFromDifferentProjectTests.BaseTest", + ClassName = "InheritedTestsFromDifferentProjectTests", + MethodName = "BaseTest", + FullyQualifiedName = "TUnit.TestProject.InheritedTestsFromDifferentProjectTests.BaseTest", + FilePath = @"", + LineNumber = 5, + Categories = new string[] { "BaseCategory" }, + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_BaseTest_ModuleInitializer { @@ -504,7 +594,7 @@ internal static class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_BaseTestWithMultipleCategories_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_BaseTestWithMultipleCategories_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -578,6 +668,24 @@ internal sealed class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_ yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.InheritedTestsFromDifferentProjectTests.BaseTestWithMultipleCategories", + ClassName = "InheritedTestsFromDifferentProjectTests", + MethodName = "BaseTestWithMultipleCategories", + FullyQualifiedName = "TUnit.TestProject.InheritedTestsFromDifferentProjectTests.BaseTestWithMultipleCategories", + FilePath = @"", + LineNumber = 5, + Categories = new string[] { "AnotherBaseCategory", "MultipleCategories" }, + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_InheritedTestsFromDifferentProjectTests_BaseTestWithMultipleCategories_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/InheritsTestsAbstractTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/InheritsTestsAbstractTests.Test.verified.txt index fdd9b1edda..1ea0f8ba88 100644 --- a/TUnit.Core.SourceGenerator.Tests/InheritsTestsAbstractTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/InheritsTestsAbstractTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_SecondTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_SecondTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -74,6 +74,24 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_SecondTest_ yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.AbstractTests.ConcreteClass2.SecondTest", + ClassName = "ConcreteClass2", + MethodName = "SecondTest", + FullyQualifiedName = "TUnit.TestProject.AbstractTests.ConcreteClass2.SecondTest", + FilePath = @"", + LineNumber = 11, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_AbstractTests_ConcreteClass2_SecondTest_ModuleInitializer { @@ -92,7 +110,7 @@ internal static class TUnit_TestProject_AbstractTests_ConcreteClass2_SecondTest_ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClassName_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClassName_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -162,6 +180,24 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClass yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.AbstractTests.ConcreteClass2.AssertClassName", + ClassName = "ConcreteClass2", + MethodName = "AssertClassName", + FullyQualifiedName = "TUnit.TestProject.AbstractTests.ConcreteClass2.AssertClassName", + FilePath = @"", + LineNumber = 3, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClassName_ModuleInitializer { @@ -180,7 +216,7 @@ internal static class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClass #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -249,6 +285,24 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClass yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.AbstractTests.ConcreteClass1.AssertClassName", + ClassName = "ConcreteClass1", + MethodName = "AssertClassName", + FullyQualifiedName = "TUnit.TestProject.AbstractTests.ConcreteClass1.AssertClassName", + FilePath = @"", + LineNumber = 3, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/InheritsTestsTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/InheritsTestsTests.Test.verified.txt index 0f192ff3f5..3900e8330b 100644 --- a/TUnit.Core.SourceGenerator.Tests/InheritsTestsTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/InheritsTestsTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1924_None_BaseClass_Test__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1924_None_BaseClass_Test__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { #if NET8_0_OR_GREATER [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "k__BackingField")] @@ -142,6 +142,24 @@ internal sealed class TUnit_TestProject_Bugs__1924_None_BaseClass_Test__int_Test yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1924.None.BaseClass.Test", + ClassName = "BaseClass", + MethodName = "Test", + FullyQualifiedName = "TUnit.TestProject.Bugs._1924.None.BaseClass.Test", + FilePath = @"", + LineNumber = 11, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 10, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1924_None_BaseClass_Test__int_ModuleInitializer { @@ -160,7 +178,7 @@ internal static class TUnit_TestProject_Bugs__1924_None_BaseClass_Test__int_Modu #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1924_None_Tests_Test__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1924_None_Tests_Test__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { #if NET8_0_OR_GREATER [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "k__BackingField")] @@ -287,6 +305,24 @@ internal sealed class TUnit_TestProject_Bugs__1924_None_Tests_Test__int_TestSour yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1924.None.Tests.Test", + ClassName = "Tests", + MethodName = "Test", + FullyQualifiedName = "TUnit.TestProject.Bugs._1924.None.Tests.Test", + FilePath = @"", + LineNumber = 23, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 10, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1924_None_Tests_Test__int_ModuleInitializer { @@ -305,7 +341,7 @@ internal static class TUnit_TestProject_Bugs__1924_None_Tests_Test__int_ModuleIn #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1924_None_Tests2_Test__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1924_None_Tests2_Test__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { #if NET8_0_OR_GREATER [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "k__BackingField")] @@ -432,6 +468,24 @@ internal sealed class TUnit_TestProject_Bugs__1924_None_Tests2_Test__int_TestSou yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1924.None.Tests2.Test", + ClassName = "Tests2", + MethodName = "Test", + FullyQualifiedName = "TUnit.TestProject.Bugs._1924.None.Tests2.Test", + FilePath = @"", + LineNumber = 26, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 10, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1924_None_Tests2_Test__int_ModuleInitializer { @@ -450,7 +504,7 @@ internal static class TUnit_TestProject_Bugs__1924_None_Tests2_Test__int_ModuleI #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1924_None_Tests3_Test__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1924_None_Tests3_Test__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { #if NET8_0_OR_GREATER [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "k__BackingField")] @@ -577,6 +631,24 @@ internal sealed class TUnit_TestProject_Bugs__1924_None_Tests3_Test__int_TestSou yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1924.None.Tests3.Test", + ClassName = "Tests3", + MethodName = "Test", + FullyQualifiedName = "TUnit.TestProject.Bugs._1924.None.Tests3.Test", + FilePath = @"", + LineNumber = 29, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 10, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1924_None_Tests3_Test__int_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/Issue2887Tests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Issue2887Tests.Test.verified.txt index 716c20d744..f2c31ac84d 100644 --- a/TUnit.Core.SourceGenerator.Tests/Issue2887Tests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Issue2887Tests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__Issue2887_ActualTestClass_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__Issue2887_ActualTestClass_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -86,6 +86,24 @@ internal sealed class TUnit_TestProject_Bugs__Issue2887_ActualTestClass_Test1_Te yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._Issue2887.ActualTestClass.Test1", + ClassName = "ActualTestClass", + MethodName = "Test1", + FullyQualifiedName = "TUnit.TestProject.Bugs._Issue2887.ActualTestClass.Test1", + FilePath = @"", + LineNumber = 26, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__Issue2887_ActualTestClass_Test1_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/MatrixTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/MatrixTests.Test.verified.txt index 9b3fa0a86d..59540bbd55 100644 --- a/TUnit.Core.SourceGenerator.Tests/MatrixTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/MatrixTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_MatrixTests_MatrixTest_One__string_int_bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_MatrixTests_MatrixTest_One__string_int_bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -106,6 +106,24 @@ internal sealed class TUnit_TestProject_MatrixTests_MatrixTest_One__string_int_b yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.MatrixTests.MatrixTest_One", + ClassName = "MatrixTests", + MethodName = "MatrixTest_One", + FullyQualifiedName = "TUnit.TestProject.MatrixTests.MatrixTest_One", + FilePath = @"", + LineNumber = 9, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_MatrixTests_MatrixTest_One__string_int_bool_ModuleInitializer { @@ -124,7 +142,7 @@ internal static class TUnit_TestProject_MatrixTests_MatrixTest_One__string_int_b #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_MatrixTests_MatrixTest_Two__int_int_int_bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_MatrixTests_MatrixTest_Two__int_int_int_bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -234,6 +252,24 @@ internal sealed class TUnit_TestProject_MatrixTests_MatrixTest_Two__int_int_int_ yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.MatrixTests.MatrixTest_Two", + ClassName = "MatrixTests", + MethodName = "MatrixTest_Two", + FullyQualifiedName = "TUnit.TestProject.MatrixTests.MatrixTest_Two", + FilePath = @"", + LineNumber = 19, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_MatrixTests_MatrixTest_Two__int_int_int_bool_ModuleInitializer { @@ -252,7 +288,7 @@ internal static class TUnit_TestProject_MatrixTests_MatrixTest_Two__int_int_int_ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_MatrixTests_MatrixTest_Enum__int_TestEnum_TestEnum__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_MatrixTests_MatrixTest_Enum__int_TestEnum_TestEnum__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -355,6 +391,24 @@ internal sealed class TUnit_TestProject_MatrixTests_MatrixTest_Enum__int_TestEnu yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.MatrixTests.MatrixTest_Enum", + ClassName = "MatrixTests", + MethodName = "MatrixTest_Enum", + FullyQualifiedName = "TUnit.TestProject.MatrixTests.MatrixTest_Enum", + FilePath = @"", + LineNumber = 30, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_MatrixTests_MatrixTest_Enum__int_TestEnum_TestEnum__ModuleInitializer { @@ -373,7 +427,7 @@ internal static class TUnit_TestProject_MatrixTests_MatrixTest_Enum__int_TestEnu #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_MatrixTests_AutoGenerateBools__string_bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_MatrixTests_AutoGenerateBools__string_bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -469,6 +523,24 @@ internal sealed class TUnit_TestProject_MatrixTests_AutoGenerateBools__string_bo yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.MatrixTests.AutoGenerateBools", + ClassName = "MatrixTests", + MethodName = "AutoGenerateBools", + FullyQualifiedName = "TUnit.TestProject.MatrixTests.AutoGenerateBools", + FilePath = @"", + LineNumber = 40, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_MatrixTests_AutoGenerateBools__string_bool_ModuleInitializer { @@ -487,7 +559,7 @@ internal static class TUnit_TestProject_MatrixTests_AutoGenerateBools__string_bo #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_MatrixTests_AutoGenerateBools2__string_bool__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_MatrixTests_AutoGenerateBools2__string_bool__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -583,6 +655,24 @@ internal sealed class TUnit_TestProject_MatrixTests_AutoGenerateBools2__string_b yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.MatrixTests.AutoGenerateBools2", + ClassName = "MatrixTests", + MethodName = "AutoGenerateBools2", + FullyQualifiedName = "TUnit.TestProject.MatrixTests.AutoGenerateBools2", + FilePath = @"", + LineNumber = 49, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_MatrixTests_AutoGenerateBools2__string_bool__ModuleInitializer { @@ -601,7 +691,7 @@ internal static class TUnit_TestProject_MatrixTests_AutoGenerateBools2__string_b #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_MatrixTests_ImplicitConversion__OneOf_TestEnum__TestEnum2__bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_MatrixTests_ImplicitConversion__OneOf_TestEnum__TestEnum2__bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -697,6 +787,24 @@ internal sealed class TUnit_TestProject_MatrixTests_ImplicitConversion__OneOf_Te yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.MatrixTests.ImplicitConversion", + ClassName = "MatrixTests", + MethodName = "ImplicitConversion", + FullyQualifiedName = "TUnit.TestProject.MatrixTests.ImplicitConversion", + FilePath = @"", + LineNumber = 58, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_MatrixTests_ImplicitConversion__OneOf_TestEnum__TestEnum2__bool_ModuleInitializer { @@ -715,7 +823,7 @@ internal static class TUnit_TestProject_MatrixTests_ImplicitConversion__OneOf_Te #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_MatrixTests_ExcludingAutoGeneratedMatrixValues__CountToTenEnum_bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_MatrixTests_ExcludingAutoGeneratedMatrixValues__CountToTenEnum_bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -811,6 +919,24 @@ internal sealed class TUnit_TestProject_MatrixTests_ExcludingAutoGeneratedMatrix yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.MatrixTests.ExcludingAutoGeneratedMatrixValues", + ClassName = "MatrixTests", + MethodName = "ExcludingAutoGeneratedMatrixValues", + FullyQualifiedName = "TUnit.TestProject.MatrixTests.ExcludingAutoGeneratedMatrixValues", + FilePath = @"", + LineNumber = 67, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_MatrixTests_ExcludingAutoGeneratedMatrixValues__CountToTenEnum_bool_ModuleInitializer { @@ -829,7 +955,7 @@ internal static class TUnit_TestProject_MatrixTests_ExcludingAutoGeneratedMatrix #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_MatrixTests_Method1__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_MatrixTests_Method1__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -918,6 +1044,24 @@ internal sealed class TUnit_TestProject_MatrixTests_Method1__int_TestSource : gl yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.MatrixTests.Method1", + ClassName = "MatrixTests", + MethodName = "Method1", + FullyQualifiedName = "TUnit.TestProject.MatrixTests.Method1", + FilePath = @"", + LineNumber = 116, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_MatrixTests_Method1__int_ModuleInitializer { @@ -936,7 +1080,7 @@ internal static class TUnit_TestProject_MatrixTests_Method1__int_ModuleInitializ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_MatrixTests_Method2__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_MatrixTests_Method2__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1025,6 +1169,24 @@ internal sealed class TUnit_TestProject_MatrixTests_Method2__int_TestSource : gl yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.MatrixTests.Method2", + ClassName = "MatrixTests", + MethodName = "Method2", + FullyQualifiedName = "TUnit.TestProject.MatrixTests.Method2", + FilePath = @"", + LineNumber = 124, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_MatrixTests_Method2__int_ModuleInitializer { @@ -1043,7 +1205,7 @@ internal static class TUnit_TestProject_MatrixTests_Method2__int_ModuleInitializ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_MatrixTests_Method3__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_MatrixTests_Method3__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1132,6 +1294,24 @@ internal sealed class TUnit_TestProject_MatrixTests_Method3__int_TestSource : gl yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.MatrixTests.Method3", + ClassName = "MatrixTests", + MethodName = "Method3", + FullyQualifiedName = "TUnit.TestProject.MatrixTests.Method3", + FilePath = @"", + LineNumber = 132, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_MatrixTests_Method3__int_ModuleInitializer { @@ -1150,7 +1330,7 @@ internal static class TUnit_TestProject_MatrixTests_Method3__int_ModuleInitializ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_MatrixTests_Method4__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_MatrixTests_Method4__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1239,6 +1419,24 @@ internal sealed class TUnit_TestProject_MatrixTests_Method4__int_TestSource : gl yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.MatrixTests.Method4", + ClassName = "MatrixTests", + MethodName = "Method4", + FullyQualifiedName = "TUnit.TestProject.MatrixTests.Method4", + FilePath = @"", + LineNumber = 140, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_MatrixTests_Method4__int_ModuleInitializer { @@ -1257,7 +1455,7 @@ internal static class TUnit_TestProject_MatrixTests_Method4__int_ModuleInitializ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_MatrixTests_Exclusion__int_int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_MatrixTests_Exclusion__int_int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1356,6 +1554,24 @@ internal sealed class TUnit_TestProject_MatrixTests_Exclusion__int_int_TestSourc yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.MatrixTests.Exclusion", + ClassName = "MatrixTests", + MethodName = "Exclusion", + FullyQualifiedName = "TUnit.TestProject.MatrixTests.Exclusion", + FilePath = @"", + LineNumber = 148, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_MatrixTests_Exclusion__int_int_ModuleInitializer { @@ -1374,7 +1590,7 @@ internal static class TUnit_TestProject_MatrixTests_Exclusion__int_int_ModuleIni #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_MatrixTests_MatrixMethod_WithEnumParameter_UsesOnlyMethodValues__bool_CountToTenEnum_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_MatrixTests_MatrixMethod_WithEnumParameter_UsesOnlyMethodValues__bool_CountToTenEnum_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1470,6 +1686,24 @@ internal sealed class TUnit_TestProject_MatrixTests_MatrixMethod_WithEnumParamet yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.MatrixTests.MatrixMethod_WithEnumParameter_UsesOnlyMethodValues", + ClassName = "MatrixTests", + MethodName = "MatrixMethod_WithEnumParameter_UsesOnlyMethodValues", + FullyQualifiedName = "TUnit.TestProject.MatrixTests.MatrixMethod_WithEnumParameter_UsesOnlyMethodValues", + FilePath = @"", + LineNumber = 197, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_MatrixTests_MatrixMethod_WithEnumParameter_UsesOnlyMethodValues__bool_CountToTenEnum_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/MethodDataSourceDrivenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/MethodDataSourceDrivenTests.Test.verified.txt index beb11429e7..5ed254b690 100644 --- a/TUnit.Core.SourceGenerator.Tests/MethodDataSourceDrivenTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/MethodDataSourceDrivenTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_Method__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_Method__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -104,6 +104,24 @@ internal sealed class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_M yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.MethodDataSourceDrivenTests.DataSource_Method", + ClassName = "MethodDataSourceDrivenTests", + MethodName = "DataSource_Method", + FullyQualifiedName = "TUnit.TestProject.MethodDataSourceDrivenTests.DataSource_Method", + FilePath = @"", + LineNumber = 12, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_Method__int_ModuleInitializer { @@ -122,7 +140,7 @@ internal static class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_M #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_Method2__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_Method2__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -223,6 +241,24 @@ internal sealed class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_M yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.MethodDataSourceDrivenTests.DataSource_Method2", + ClassName = "MethodDataSourceDrivenTests", + MethodName = "DataSource_Method2", + FullyQualifiedName = "TUnit.TestProject.MethodDataSourceDrivenTests.DataSource_Method2", + FilePath = @"", + LineNumber = 19, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_Method2__int_ModuleInitializer { @@ -241,7 +277,7 @@ internal static class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_M #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_Method_WithAction__Action_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_Method_WithAction__Action_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -342,6 +378,24 @@ internal sealed class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_M yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.MethodDataSourceDrivenTests.DataSource_Method_WithAction", + ClassName = "MethodDataSourceDrivenTests", + MethodName = "DataSource_Method_WithAction", + FullyQualifiedName = "TUnit.TestProject.MethodDataSourceDrivenTests.DataSource_Method_WithAction", + FilePath = @"", + LineNumber = 26, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_Method_WithAction__Action_ModuleInitializer { @@ -360,7 +414,7 @@ internal static class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_M #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_Method3__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_Method3__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -476,6 +530,24 @@ internal sealed class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_M yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.MethodDataSourceDrivenTests.DataSource_Method3", + ClassName = "MethodDataSourceDrivenTests", + MethodName = "DataSource_Method3", + FullyQualifiedName = "TUnit.TestProject.MethodDataSourceDrivenTests.DataSource_Method3", + FilePath = @"", + LineNumber = 33, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_Method3__int_ModuleInitializer { @@ -494,7 +566,7 @@ internal static class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_M #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_Method4__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_Method4__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -637,6 +709,24 @@ internal sealed class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_M yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.MethodDataSourceDrivenTests.DataSource_Method4", + ClassName = "MethodDataSourceDrivenTests", + MethodName = "DataSource_Method4", + FullyQualifiedName = "TUnit.TestProject.MethodDataSourceDrivenTests.DataSource_Method4", + FilePath = @"", + LineNumber = 42, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_Method4__int_ModuleInitializer { @@ -655,7 +745,7 @@ internal static class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_M #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_WithBaseReturn__BaseValue_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_WithBaseReturn__BaseValue_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -756,6 +846,24 @@ internal sealed class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_W yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.MethodDataSourceDrivenTests.DataSource_WithBaseReturn", + ClassName = "MethodDataSourceDrivenTests", + MethodName = "DataSource_WithBaseReturn", + FullyQualifiedName = "TUnit.TestProject.MethodDataSourceDrivenTests.DataSource_WithBaseReturn", + FilePath = @"", + LineNumber = 53, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_WithBaseReturn__BaseValue_ModuleInitializer { @@ -774,7 +882,7 @@ internal static class TUnit_TestProject_MethodDataSourceDrivenTests_DataSource_W #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_MethodDataSourceDrivenTests_EnumerableFuncArrayTest__string___TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_MethodDataSourceDrivenTests_EnumerableFuncArrayTest__string___TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -884,6 +992,24 @@ internal sealed class TUnit_TestProject_MethodDataSourceDrivenTests_EnumerableFu yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.MethodDataSourceDrivenTests.EnumerableFuncArrayTest", + ClassName = "MethodDataSourceDrivenTests", + MethodName = "EnumerableFuncArrayTest", + FullyQualifiedName = "TUnit.TestProject.MethodDataSourceDrivenTests.EnumerableFuncArrayTest", + FilePath = @"", + LineNumber = 59, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_MethodDataSourceDrivenTests_EnumerableFuncArrayTest__string___ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/MethodDataSourceDrivenWithCancellationTokenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/MethodDataSourceDrivenWithCancellationTokenTests.Test.verified.txt index 0a25276f19..cddcc15389 100644 --- a/TUnit.Core.SourceGenerator.Tests/MethodDataSourceDrivenWithCancellationTokenTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/MethodDataSourceDrivenWithCancellationTokenTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_MethodDataSourceDrivenWithCancellationTokenTests_MyTest__int_CancellationToken_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_MethodDataSourceDrivenWithCancellationTokenTests_MyTest__int_CancellationToken_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -213,6 +213,24 @@ internal sealed class TUnit_TestProject_MethodDataSourceDrivenWithCancellationTo yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.MethodDataSourceDrivenWithCancellationTokenTests.MyTest", + ClassName = "MethodDataSourceDrivenWithCancellationTokenTests", + MethodName = "MyTest", + FullyQualifiedName = "TUnit.TestProject.MethodDataSourceDrivenWithCancellationTokenTests.MyTest", + FilePath = @"", + LineNumber = 12, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_MethodDataSourceDrivenWithCancellationTokenTests_MyTest__int_CancellationToken_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/MultipleClassDataSourceDrivenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/MultipleClassDataSourceDrivenTests.Test.verified.txt index e96980da8b..b5e8ec0b7a 100644 --- a/TUnit.Core.SourceGenerator.Tests/MultipleClassDataSourceDrivenTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/MultipleClassDataSourceDrivenTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_MultipleClassDataSourceDrivenTests_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_MultipleClassDataSourceDrivenTests_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -119,6 +119,24 @@ internal sealed class TUnit_TestProject_MultipleClassDataSourceDrivenTests_Test1 yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.MultipleClassDataSourceDrivenTests.Test1", + ClassName = "MultipleClassDataSourceDrivenTests", + MethodName = "Test1", + FullyQualifiedName = "TUnit.TestProject.MultipleClassDataSourceDrivenTests.Test1", + FilePath = @"", + LineNumber = 17, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_MultipleClassDataSourceDrivenTests_Test1_ModuleInitializer { @@ -137,7 +155,7 @@ internal static class TUnit_TestProject_MultipleClassDataSourceDrivenTests_Test1 #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_MultipleClassDataSourceDrivenTests_Test2_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_MultipleClassDataSourceDrivenTests_Test2_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -253,6 +271,24 @@ internal sealed class TUnit_TestProject_MultipleClassDataSourceDrivenTests_Test2 yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.MultipleClassDataSourceDrivenTests.Test2", + ClassName = "MultipleClassDataSourceDrivenTests", + MethodName = "Test2", + FullyQualifiedName = "TUnit.TestProject.MultipleClassDataSourceDrivenTests.Test2", + FilePath = @"", + LineNumber = 23, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_MultipleClassDataSourceDrivenTests_Test2_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/NameOfArgumentTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/NameOfArgumentTests.Test.verified.txt index 9bb78eda2d..27c8bba93a 100644 --- a/TUnit.Core.SourceGenerator.Tests/NameOfArgumentTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/NameOfArgumentTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_NameOfArgumentTests_TestName__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_NameOfArgumentTests_TestName__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -92,6 +92,24 @@ internal sealed class TUnit_TestProject_NameOfArgumentTests_TestName__string_Tes yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.NameOfArgumentTests.TestName", + ClassName = "NameOfArgumentTests", + MethodName = "TestName", + FullyQualifiedName = "TUnit.TestProject.NameOfArgumentTests.TestName", + FilePath = @"", + LineNumber = 8, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_NameOfArgumentTests_TestName__string_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/NullableByteArgumentTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/NullableByteArgumentTests.Test.verified.txt index 60b1e9ef0e..915da21737 100644 --- a/TUnit.Core.SourceGenerator.Tests/NullableByteArgumentTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/NullableByteArgumentTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_NullableByteArgumentTests_Test__byte__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_NullableByteArgumentTests_Test__byte__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -94,6 +94,24 @@ internal sealed class TUnit_TestProject_NullableByteArgumentTests_Test__byte__Te yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.NullableByteArgumentTests.Test", + ClassName = "NullableByteArgumentTests", + MethodName = "Test", + FullyQualifiedName = "TUnit.TestProject.NullableByteArgumentTests.Test", + FilePath = @"", + LineNumber = 8, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_NullableByteArgumentTests_Test__byte__ModuleInitializer { @@ -112,7 +130,7 @@ internal static class TUnit_TestProject_NullableByteArgumentTests_Test__byte__Mo #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_NullableByteArgumentTests_Test2__byte_byte__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_NullableByteArgumentTests_Test2__byte_byte__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -210,6 +228,24 @@ internal sealed class TUnit_TestProject_NullableByteArgumentTests_Test2__byte_by yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.NullableByteArgumentTests.Test2", + ClassName = "NullableByteArgumentTests", + MethodName = "Test2", + FullyQualifiedName = "TUnit.TestProject.NullableByteArgumentTests.Test2", + FilePath = @"", + LineNumber = 15, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_NullableByteArgumentTests_Test2__byte_byte__ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/NumberArgumentTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/NumberArgumentTests.Test.verified.txt index ba3b1e1df9..f69b2bc26c 100644 --- a/TUnit.Core.SourceGenerator.Tests/NumberArgumentTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/NumberArgumentTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_NumberArgumentTests_Int__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_NumberArgumentTests_Int__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -93,6 +93,24 @@ internal sealed class TUnit_TestProject_NumberArgumentTests_Int__int_TestSource yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.NumberArgumentTests.Int", + ClassName = "NumberArgumentTests", + MethodName = "Int", + FullyQualifiedName = "TUnit.TestProject.NumberArgumentTests.Int", + FilePath = @"", + LineNumber = 8, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_NumberArgumentTests_Int__int_ModuleInitializer { @@ -111,7 +129,7 @@ internal static class TUnit_TestProject_NumberArgumentTests_Int__int_ModuleIniti #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_NumberArgumentTests_Double__double_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_NumberArgumentTests_Double__double_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -201,6 +219,24 @@ internal sealed class TUnit_TestProject_NumberArgumentTests_Double__double_TestS yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.NumberArgumentTests.Double", + ClassName = "NumberArgumentTests", + MethodName = "Double", + FullyQualifiedName = "TUnit.TestProject.NumberArgumentTests.Double", + FilePath = @"", + LineNumber = 15, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_NumberArgumentTests_Double__double_ModuleInitializer { @@ -219,7 +255,7 @@ internal static class TUnit_TestProject_NumberArgumentTests_Double__double_Modul #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_NumberArgumentTests_Float__float_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_NumberArgumentTests_Float__float_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -309,6 +345,24 @@ internal sealed class TUnit_TestProject_NumberArgumentTests_Float__float_TestSou yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.NumberArgumentTests.Float", + ClassName = "NumberArgumentTests", + MethodName = "Float", + FullyQualifiedName = "TUnit.TestProject.NumberArgumentTests.Float", + FilePath = @"", + LineNumber = 22, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_NumberArgumentTests_Float__float_ModuleInitializer { @@ -327,7 +381,7 @@ internal static class TUnit_TestProject_NumberArgumentTests_Float__float_ModuleI #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_NumberArgumentTests_Long__long_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_NumberArgumentTests_Long__long_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -417,6 +471,24 @@ internal sealed class TUnit_TestProject_NumberArgumentTests_Long__long_TestSourc yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.NumberArgumentTests.Long", + ClassName = "NumberArgumentTests", + MethodName = "Long", + FullyQualifiedName = "TUnit.TestProject.NumberArgumentTests.Long", + FilePath = @"", + LineNumber = 29, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_NumberArgumentTests_Long__long_ModuleInitializer { @@ -435,7 +507,7 @@ internal static class TUnit_TestProject_NumberArgumentTests_Long__long_ModuleIni #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_NumberArgumentTests_ULong__ulong_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_NumberArgumentTests_ULong__ulong_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -525,6 +597,24 @@ internal sealed class TUnit_TestProject_NumberArgumentTests_ULong__ulong_TestSou yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.NumberArgumentTests.ULong", + ClassName = "NumberArgumentTests", + MethodName = "ULong", + FullyQualifiedName = "TUnit.TestProject.NumberArgumentTests.ULong", + FilePath = @"", + LineNumber = 36, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_NumberArgumentTests_ULong__ulong_ModuleInitializer { @@ -543,7 +633,7 @@ internal static class TUnit_TestProject_NumberArgumentTests_ULong__ulong_ModuleI #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_NumberArgumentTests_UInt__uint_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_NumberArgumentTests_UInt__uint_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -633,6 +723,24 @@ internal sealed class TUnit_TestProject_NumberArgumentTests_UInt__uint_TestSourc yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.NumberArgumentTests.UInt", + ClassName = "NumberArgumentTests", + MethodName = "UInt", + FullyQualifiedName = "TUnit.TestProject.NumberArgumentTests.UInt", + FilePath = @"", + LineNumber = 43, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_NumberArgumentTests_UInt__uint_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/NumberArgumentTests.TestDE.verified.txt b/TUnit.Core.SourceGenerator.Tests/NumberArgumentTests.TestDE.verified.txt index ba3b1e1df9..f69b2bc26c 100644 --- a/TUnit.Core.SourceGenerator.Tests/NumberArgumentTests.TestDE.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/NumberArgumentTests.TestDE.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_NumberArgumentTests_Int__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_NumberArgumentTests_Int__int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -93,6 +93,24 @@ internal sealed class TUnit_TestProject_NumberArgumentTests_Int__int_TestSource yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.NumberArgumentTests.Int", + ClassName = "NumberArgumentTests", + MethodName = "Int", + FullyQualifiedName = "TUnit.TestProject.NumberArgumentTests.Int", + FilePath = @"", + LineNumber = 8, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_NumberArgumentTests_Int__int_ModuleInitializer { @@ -111,7 +129,7 @@ internal static class TUnit_TestProject_NumberArgumentTests_Int__int_ModuleIniti #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_NumberArgumentTests_Double__double_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_NumberArgumentTests_Double__double_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -201,6 +219,24 @@ internal sealed class TUnit_TestProject_NumberArgumentTests_Double__double_TestS yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.NumberArgumentTests.Double", + ClassName = "NumberArgumentTests", + MethodName = "Double", + FullyQualifiedName = "TUnit.TestProject.NumberArgumentTests.Double", + FilePath = @"", + LineNumber = 15, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_NumberArgumentTests_Double__double_ModuleInitializer { @@ -219,7 +255,7 @@ internal static class TUnit_TestProject_NumberArgumentTests_Double__double_Modul #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_NumberArgumentTests_Float__float_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_NumberArgumentTests_Float__float_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -309,6 +345,24 @@ internal sealed class TUnit_TestProject_NumberArgumentTests_Float__float_TestSou yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.NumberArgumentTests.Float", + ClassName = "NumberArgumentTests", + MethodName = "Float", + FullyQualifiedName = "TUnit.TestProject.NumberArgumentTests.Float", + FilePath = @"", + LineNumber = 22, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_NumberArgumentTests_Float__float_ModuleInitializer { @@ -327,7 +381,7 @@ internal static class TUnit_TestProject_NumberArgumentTests_Float__float_ModuleI #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_NumberArgumentTests_Long__long_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_NumberArgumentTests_Long__long_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -417,6 +471,24 @@ internal sealed class TUnit_TestProject_NumberArgumentTests_Long__long_TestSourc yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.NumberArgumentTests.Long", + ClassName = "NumberArgumentTests", + MethodName = "Long", + FullyQualifiedName = "TUnit.TestProject.NumberArgumentTests.Long", + FilePath = @"", + LineNumber = 29, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_NumberArgumentTests_Long__long_ModuleInitializer { @@ -435,7 +507,7 @@ internal static class TUnit_TestProject_NumberArgumentTests_Long__long_ModuleIni #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_NumberArgumentTests_ULong__ulong_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_NumberArgumentTests_ULong__ulong_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -525,6 +597,24 @@ internal sealed class TUnit_TestProject_NumberArgumentTests_ULong__ulong_TestSou yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.NumberArgumentTests.ULong", + ClassName = "NumberArgumentTests", + MethodName = "ULong", + FullyQualifiedName = "TUnit.TestProject.NumberArgumentTests.ULong", + FilePath = @"", + LineNumber = 36, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_NumberArgumentTests_ULong__ulong_ModuleInitializer { @@ -543,7 +633,7 @@ internal static class TUnit_TestProject_NumberArgumentTests_ULong__ulong_ModuleI #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_NumberArgumentTests_UInt__uint_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_NumberArgumentTests_UInt__uint_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -633,6 +723,24 @@ internal sealed class TUnit_TestProject_NumberArgumentTests_UInt__uint_TestSourc yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.NumberArgumentTests.UInt", + ClassName = "NumberArgumentTests", + MethodName = "UInt", + FullyQualifiedName = "TUnit.TestProject.NumberArgumentTests.UInt", + FilePath = @"", + LineNumber = 43, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_NumberArgumentTests_UInt__uint_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/PriorityFilteringTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/PriorityFilteringTests.Test.verified.txt index 90776b2e04..f4735d1591 100644 --- a/TUnit.Core.SourceGenerator.Tests/PriorityFilteringTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/PriorityFilteringTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_PriorityFilteringTests_High_1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_PriorityFilteringTests_High_1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -72,6 +72,24 @@ internal sealed class TUnit_TestProject_PriorityFilteringTests_High_1_TestSource yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.PriorityFilteringTests.High_1", + ClassName = "PriorityFilteringTests", + MethodName = "High_1", + FullyQualifiedName = "TUnit.TestProject.PriorityFilteringTests.High_1", + FilePath = @"", + LineNumber = 12, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_PriorityFilteringTests_High_1_ModuleInitializer { @@ -90,7 +108,7 @@ internal static class TUnit_TestProject_PriorityFilteringTests_High_1_ModuleInit #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_PriorityFilteringTests_High_2_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_PriorityFilteringTests_High_2_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -159,6 +177,24 @@ internal sealed class TUnit_TestProject_PriorityFilteringTests_High_2_TestSource yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.PriorityFilteringTests.High_2", + ClassName = "PriorityFilteringTests", + MethodName = "High_2", + FullyQualifiedName = "TUnit.TestProject.PriorityFilteringTests.High_2", + FilePath = @"", + LineNumber = 18, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_PriorityFilteringTests_High_2_ModuleInitializer { @@ -177,7 +213,7 @@ internal static class TUnit_TestProject_PriorityFilteringTests_High_2_ModuleInit #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_PriorityFilteringTests_High_3_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_PriorityFilteringTests_High_3_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -246,6 +282,24 @@ internal sealed class TUnit_TestProject_PriorityFilteringTests_High_3_TestSource yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.PriorityFilteringTests.High_3", + ClassName = "PriorityFilteringTests", + MethodName = "High_3", + FullyQualifiedName = "TUnit.TestProject.PriorityFilteringTests.High_3", + FilePath = @"", + LineNumber = 24, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_PriorityFilteringTests_High_3_ModuleInitializer { @@ -264,7 +318,7 @@ internal static class TUnit_TestProject_PriorityFilteringTests_High_3_ModuleInit #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_PriorityFilteringTests_Medium_1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_PriorityFilteringTests_Medium_1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -333,6 +387,24 @@ internal sealed class TUnit_TestProject_PriorityFilteringTests_Medium_1_TestSour yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.PriorityFilteringTests.Medium_1", + ClassName = "PriorityFilteringTests", + MethodName = "Medium_1", + FullyQualifiedName = "TUnit.TestProject.PriorityFilteringTests.Medium_1", + FilePath = @"", + LineNumber = 30, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_PriorityFilteringTests_Medium_1_ModuleInitializer { @@ -351,7 +423,7 @@ internal static class TUnit_TestProject_PriorityFilteringTests_Medium_1_ModuleIn #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_PriorityFilteringTests_Medium_2_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_PriorityFilteringTests_Medium_2_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -420,6 +492,24 @@ internal sealed class TUnit_TestProject_PriorityFilteringTests_Medium_2_TestSour yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.PriorityFilteringTests.Medium_2", + ClassName = "PriorityFilteringTests", + MethodName = "Medium_2", + FullyQualifiedName = "TUnit.TestProject.PriorityFilteringTests.Medium_2", + FilePath = @"", + LineNumber = 36, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_PriorityFilteringTests_Medium_2_ModuleInitializer { @@ -438,7 +528,7 @@ internal static class TUnit_TestProject_PriorityFilteringTests_Medium_2_ModuleIn #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_PriorityFilteringTests_Low_1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_PriorityFilteringTests_Low_1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -507,6 +597,24 @@ internal sealed class TUnit_TestProject_PriorityFilteringTests_Low_1_TestSource yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.PriorityFilteringTests.Low_1", + ClassName = "PriorityFilteringTests", + MethodName = "Low_1", + FullyQualifiedName = "TUnit.TestProject.PriorityFilteringTests.Low_1", + FilePath = @"", + LineNumber = 42, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_PriorityFilteringTests_Low_1_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/PropertySetterTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/PropertySetterTests.Test.verified.txt index 6ca53de893..5af9e4459a 100644 --- a/TUnit.Core.SourceGenerator.Tests/PropertySetterTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/PropertySetterTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_PropertySetterTests_Test_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_PropertySetterTests_Test_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { #if NET8_0_OR_GREATER [global::System.Runtime.CompilerServices.UnsafeAccessor(global::System.Runtime.CompilerServices.UnsafeAccessorKind.Field, Name = "k__BackingField")] @@ -336,6 +336,24 @@ internal sealed class TUnit_TestProject_PropertySetterTests_Test_TestSource : gl yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.PropertySetterTests.Test", + ClassName = "PropertySetterTests", + MethodName = "Test", + FullyQualifiedName = "TUnit.TestProject.PropertySetterTests.Test", + FilePath = @"", + LineNumber = 69, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_PropertySetterTests_Test_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/RepeatTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/RepeatTests.Test.verified.txt index c359cf4a4f..1ca3a6037a 100644 --- a/TUnit.Core.SourceGenerator.Tests/RepeatTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/RepeatTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_RepeatTests_One_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_RepeatTests_One_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -76,6 +76,24 @@ internal sealed class TUnit_TestProject_RepeatTests_One_TestSource : global::TUn yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.RepeatTests.One", + ClassName = "RepeatTests", + MethodName = "One", + FullyQualifiedName = "TUnit.TestProject.RepeatTests.One", + FilePath = @"", + LineNumber = 9, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 1, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_RepeatTests_One_ModuleInitializer { @@ -94,7 +112,7 @@ internal static class TUnit_TestProject_RepeatTests_One_ModuleInitializer #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_RepeatTests_Two_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_RepeatTests_Two_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -167,6 +185,24 @@ internal sealed class TUnit_TestProject_RepeatTests_Two_TestSource : global::TUn yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.RepeatTests.Two", + ClassName = "RepeatTests", + MethodName = "Two", + FullyQualifiedName = "TUnit.TestProject.RepeatTests.Two", + FilePath = @"", + LineNumber = 16, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 2, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_RepeatTests_Two_ModuleInitializer { @@ -185,7 +221,7 @@ internal static class TUnit_TestProject_RepeatTests_Two_ModuleInitializer #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_RepeatTests_Three_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_RepeatTests_Three_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -257,6 +293,24 @@ internal sealed class TUnit_TestProject_RepeatTests_Three_TestSource : global::T yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.RepeatTests.Three", + ClassName = "RepeatTests", + MethodName = "Three", + FullyQualifiedName = "TUnit.TestProject.RepeatTests.Three", + FilePath = @"", + LineNumber = 23, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 3, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_RepeatTests_Three_ModuleInitializer { 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 6f2ad0396b..c9cfc8b1de 100644 --- a/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet10_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet10_0.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_With_STA_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_With_STA_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -77,6 +77,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_With_STA_TestSource : glo yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.With_STA", + ClassName = "STAThreadTests", + MethodName = "With_STA", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.With_STA", + FilePath = @"", + LineNumber = 14, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_With_STA_ModuleInitializer { @@ -95,7 +113,7 @@ internal static class TUnit_TestProject_STAThreadTests_With_STA_ModuleInitialize #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_Without_STA_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_Without_STA_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -168,6 +186,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_Without_STA_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.Without_STA", + ClassName = "STAThreadTests", + MethodName = "Without_STA", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.Without_STA", + FilePath = @"", + LineNumber = 20, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_Without_STA_ModuleInitializer { @@ -186,7 +222,7 @@ internal static class TUnit_TestProject_STAThreadTests_Without_STA_ModuleInitial #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithSimpleAwait_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithSimpleAwait_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -260,6 +296,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithSimpleAwait_TestS yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithSimpleAwait", + ClassName = "STAThreadTests", + MethodName = "STA_WithSimpleAwait", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithSimpleAwait", + FilePath = @"", + LineNumber = 26, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithSimpleAwait_ModuleInitializer { @@ -278,7 +332,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithSimpleAwait_Modul #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskYield_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskYield_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -352,6 +406,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskYield_TestSou yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithTaskYield", + ClassName = "STAThreadTests", + MethodName = "STA_WithTaskYield", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithTaskYield", + FilePath = @"", + LineNumber = 36, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskYield_ModuleInitializer { @@ -370,7 +442,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskYield_ModuleI #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithConfigureAwaitTrue_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithConfigureAwaitTrue_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -444,6 +516,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithConfigureAwaitTru yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithConfigureAwaitTrue", + ClassName = "STAThreadTests", + MethodName = "STA_WithConfigureAwaitTrue", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithConfigureAwaitTrue", + FilePath = @"", + LineNumber = 45, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithConfigureAwaitTrue_ModuleInitializer { @@ -462,7 +552,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithConfigureAwaitTru #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithNestedAsyncCalls_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithNestedAsyncCalls_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -536,6 +626,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithNestedAsyncCalls_ yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithNestedAsyncCalls", + ClassName = "STAThreadTests", + MethodName = "STA_WithNestedAsyncCalls", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithNestedAsyncCalls", + FilePath = @"", + LineNumber = 54, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithNestedAsyncCalls_ModuleInitializer { @@ -554,7 +662,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithNestedAsyncCalls_ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskFromResult_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskFromResult_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -628,6 +736,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskFromResult_Te yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithTaskFromResult", + ClassName = "STAThreadTests", + MethodName = "STA_WithTaskFromResult", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithTaskFromResult", + FilePath = @"", + LineNumber = 64, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskFromResult_ModuleInitializer { @@ -646,7 +772,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskFromResult_Mo #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithCompletedTask_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithCompletedTask_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -720,6 +846,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithCompletedTask_Tes yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithCompletedTask", + ClassName = "STAThreadTests", + MethodName = "STA_WithCompletedTask", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithCompletedTask", + FilePath = @"", + LineNumber = 74, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithCompletedTask_ModuleInitializer { @@ -738,7 +882,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithCompletedTask_Mod #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskRun_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskRun_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -812,6 +956,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskRun_TestSourc yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithTaskRun", + ClassName = "STAThreadTests", + MethodName = "STA_WithTaskRun", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithTaskRun", + FilePath = @"", + LineNumber = 83, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskRun_ModuleInitializer { @@ -830,7 +992,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskRun_ModuleIni #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithMultipleAwaits_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithMultipleAwaits_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -904,6 +1066,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithMultipleAwaits_Te yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithMultipleAwaits", + ClassName = "STAThreadTests", + MethodName = "STA_WithMultipleAwaits", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithMultipleAwaits", + FilePath = @"", + LineNumber = 98, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithMultipleAwaits_ModuleInitializer { @@ -922,7 +1102,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithMultipleAwaits_Mo #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithAsyncEnumerable_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithAsyncEnumerable_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -996,6 +1176,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithAsyncEnumerable_T yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithAsyncEnumerable", + ClassName = "STAThreadTests", + MethodName = "STA_WithAsyncEnumerable", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithAsyncEnumerable", + FilePath = @"", + LineNumber = 116, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithAsyncEnumerable_ModuleInitializer { @@ -1014,7 +1212,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithAsyncEnumerable_M #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskWhenAll_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskWhenAll_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1088,6 +1286,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskWhenAll_TestS yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithTaskWhenAll", + ClassName = "STAThreadTests", + MethodName = "STA_WithTaskWhenAll", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithTaskWhenAll", + FilePath = @"", + LineNumber = 130, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskWhenAll_ModuleInitializer { @@ -1106,7 +1322,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskWhenAll_Modul #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithExceptionHandling_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithExceptionHandling_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1180,6 +1396,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithExceptionHandling yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithExceptionHandling", + ClassName = "STAThreadTests", + MethodName = "STA_WithExceptionHandling", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithExceptionHandling", + FilePath = @"", + LineNumber = 147, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithExceptionHandling_ModuleInitializer { @@ -1198,7 +1432,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithExceptionHandling #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithThrowsNothingAssertion_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithThrowsNothingAssertion_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1272,6 +1506,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithThrowsNothingAsse yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithThrowsNothingAssertion", + ClassName = "STAThreadTests", + MethodName = "STA_WithThrowsNothingAssertion", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithThrowsNothingAssertion", + FilePath = @"", + LineNumber = 194, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithThrowsNothingAssertion_ModuleInitializer { @@ -1290,7 +1542,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithThrowsNothingAsse #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithFuncAssertion_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithFuncAssertion_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1364,6 +1616,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithFuncAssertion_Tes yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithFuncAssertion", + ClassName = "STAThreadTests", + MethodName = "STA_WithFuncAssertion", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithFuncAssertion", + FilePath = @"", + LineNumber = 211, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithFuncAssertion_ModuleInitializer { 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 6f2ad0396b..c9cfc8b1de 100644 --- a/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet8_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet8_0.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_With_STA_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_With_STA_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -77,6 +77,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_With_STA_TestSource : glo yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.With_STA", + ClassName = "STAThreadTests", + MethodName = "With_STA", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.With_STA", + FilePath = @"", + LineNumber = 14, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_With_STA_ModuleInitializer { @@ -95,7 +113,7 @@ internal static class TUnit_TestProject_STAThreadTests_With_STA_ModuleInitialize #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_Without_STA_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_Without_STA_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -168,6 +186,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_Without_STA_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.Without_STA", + ClassName = "STAThreadTests", + MethodName = "Without_STA", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.Without_STA", + FilePath = @"", + LineNumber = 20, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_Without_STA_ModuleInitializer { @@ -186,7 +222,7 @@ internal static class TUnit_TestProject_STAThreadTests_Without_STA_ModuleInitial #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithSimpleAwait_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithSimpleAwait_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -260,6 +296,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithSimpleAwait_TestS yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithSimpleAwait", + ClassName = "STAThreadTests", + MethodName = "STA_WithSimpleAwait", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithSimpleAwait", + FilePath = @"", + LineNumber = 26, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithSimpleAwait_ModuleInitializer { @@ -278,7 +332,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithSimpleAwait_Modul #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskYield_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskYield_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -352,6 +406,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskYield_TestSou yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithTaskYield", + ClassName = "STAThreadTests", + MethodName = "STA_WithTaskYield", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithTaskYield", + FilePath = @"", + LineNumber = 36, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskYield_ModuleInitializer { @@ -370,7 +442,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskYield_ModuleI #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithConfigureAwaitTrue_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithConfigureAwaitTrue_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -444,6 +516,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithConfigureAwaitTru yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithConfigureAwaitTrue", + ClassName = "STAThreadTests", + MethodName = "STA_WithConfigureAwaitTrue", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithConfigureAwaitTrue", + FilePath = @"", + LineNumber = 45, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithConfigureAwaitTrue_ModuleInitializer { @@ -462,7 +552,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithConfigureAwaitTru #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithNestedAsyncCalls_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithNestedAsyncCalls_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -536,6 +626,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithNestedAsyncCalls_ yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithNestedAsyncCalls", + ClassName = "STAThreadTests", + MethodName = "STA_WithNestedAsyncCalls", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithNestedAsyncCalls", + FilePath = @"", + LineNumber = 54, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithNestedAsyncCalls_ModuleInitializer { @@ -554,7 +662,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithNestedAsyncCalls_ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskFromResult_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskFromResult_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -628,6 +736,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskFromResult_Te yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithTaskFromResult", + ClassName = "STAThreadTests", + MethodName = "STA_WithTaskFromResult", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithTaskFromResult", + FilePath = @"", + LineNumber = 64, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskFromResult_ModuleInitializer { @@ -646,7 +772,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskFromResult_Mo #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithCompletedTask_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithCompletedTask_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -720,6 +846,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithCompletedTask_Tes yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithCompletedTask", + ClassName = "STAThreadTests", + MethodName = "STA_WithCompletedTask", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithCompletedTask", + FilePath = @"", + LineNumber = 74, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithCompletedTask_ModuleInitializer { @@ -738,7 +882,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithCompletedTask_Mod #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskRun_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskRun_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -812,6 +956,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskRun_TestSourc yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithTaskRun", + ClassName = "STAThreadTests", + MethodName = "STA_WithTaskRun", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithTaskRun", + FilePath = @"", + LineNumber = 83, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskRun_ModuleInitializer { @@ -830,7 +992,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskRun_ModuleIni #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithMultipleAwaits_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithMultipleAwaits_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -904,6 +1066,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithMultipleAwaits_Te yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithMultipleAwaits", + ClassName = "STAThreadTests", + MethodName = "STA_WithMultipleAwaits", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithMultipleAwaits", + FilePath = @"", + LineNumber = 98, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithMultipleAwaits_ModuleInitializer { @@ -922,7 +1102,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithMultipleAwaits_Mo #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithAsyncEnumerable_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithAsyncEnumerable_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -996,6 +1176,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithAsyncEnumerable_T yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithAsyncEnumerable", + ClassName = "STAThreadTests", + MethodName = "STA_WithAsyncEnumerable", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithAsyncEnumerable", + FilePath = @"", + LineNumber = 116, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithAsyncEnumerable_ModuleInitializer { @@ -1014,7 +1212,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithAsyncEnumerable_M #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskWhenAll_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskWhenAll_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1088,6 +1286,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskWhenAll_TestS yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithTaskWhenAll", + ClassName = "STAThreadTests", + MethodName = "STA_WithTaskWhenAll", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithTaskWhenAll", + FilePath = @"", + LineNumber = 130, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskWhenAll_ModuleInitializer { @@ -1106,7 +1322,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskWhenAll_Modul #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithExceptionHandling_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithExceptionHandling_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1180,6 +1396,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithExceptionHandling yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithExceptionHandling", + ClassName = "STAThreadTests", + MethodName = "STA_WithExceptionHandling", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithExceptionHandling", + FilePath = @"", + LineNumber = 147, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithExceptionHandling_ModuleInitializer { @@ -1198,7 +1432,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithExceptionHandling #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithThrowsNothingAssertion_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithThrowsNothingAssertion_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1272,6 +1506,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithThrowsNothingAsse yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithThrowsNothingAssertion", + ClassName = "STAThreadTests", + MethodName = "STA_WithThrowsNothingAssertion", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithThrowsNothingAssertion", + FilePath = @"", + LineNumber = 194, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithThrowsNothingAssertion_ModuleInitializer { @@ -1290,7 +1542,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithThrowsNothingAsse #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithFuncAssertion_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithFuncAssertion_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1364,6 +1616,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithFuncAssertion_Tes yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithFuncAssertion", + ClassName = "STAThreadTests", + MethodName = "STA_WithFuncAssertion", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithFuncAssertion", + FilePath = @"", + LineNumber = 211, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithFuncAssertion_ModuleInitializer { 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 6f2ad0396b..c9cfc8b1de 100644 --- a/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet9_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet9_0.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_With_STA_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_With_STA_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -77,6 +77,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_With_STA_TestSource : glo yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.With_STA", + ClassName = "STAThreadTests", + MethodName = "With_STA", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.With_STA", + FilePath = @"", + LineNumber = 14, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_With_STA_ModuleInitializer { @@ -95,7 +113,7 @@ internal static class TUnit_TestProject_STAThreadTests_With_STA_ModuleInitialize #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_Without_STA_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_Without_STA_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -168,6 +186,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_Without_STA_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.Without_STA", + ClassName = "STAThreadTests", + MethodName = "Without_STA", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.Without_STA", + FilePath = @"", + LineNumber = 20, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_Without_STA_ModuleInitializer { @@ -186,7 +222,7 @@ internal static class TUnit_TestProject_STAThreadTests_Without_STA_ModuleInitial #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithSimpleAwait_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithSimpleAwait_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -260,6 +296,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithSimpleAwait_TestS yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithSimpleAwait", + ClassName = "STAThreadTests", + MethodName = "STA_WithSimpleAwait", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithSimpleAwait", + FilePath = @"", + LineNumber = 26, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithSimpleAwait_ModuleInitializer { @@ -278,7 +332,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithSimpleAwait_Modul #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskYield_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskYield_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -352,6 +406,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskYield_TestSou yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithTaskYield", + ClassName = "STAThreadTests", + MethodName = "STA_WithTaskYield", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithTaskYield", + FilePath = @"", + LineNumber = 36, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskYield_ModuleInitializer { @@ -370,7 +442,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskYield_ModuleI #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithConfigureAwaitTrue_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithConfigureAwaitTrue_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -444,6 +516,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithConfigureAwaitTru yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithConfigureAwaitTrue", + ClassName = "STAThreadTests", + MethodName = "STA_WithConfigureAwaitTrue", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithConfigureAwaitTrue", + FilePath = @"", + LineNumber = 45, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithConfigureAwaitTrue_ModuleInitializer { @@ -462,7 +552,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithConfigureAwaitTru #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithNestedAsyncCalls_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithNestedAsyncCalls_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -536,6 +626,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithNestedAsyncCalls_ yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithNestedAsyncCalls", + ClassName = "STAThreadTests", + MethodName = "STA_WithNestedAsyncCalls", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithNestedAsyncCalls", + FilePath = @"", + LineNumber = 54, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithNestedAsyncCalls_ModuleInitializer { @@ -554,7 +662,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithNestedAsyncCalls_ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskFromResult_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskFromResult_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -628,6 +736,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskFromResult_Te yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithTaskFromResult", + ClassName = "STAThreadTests", + MethodName = "STA_WithTaskFromResult", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithTaskFromResult", + FilePath = @"", + LineNumber = 64, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskFromResult_ModuleInitializer { @@ -646,7 +772,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskFromResult_Mo #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithCompletedTask_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithCompletedTask_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -720,6 +846,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithCompletedTask_Tes yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithCompletedTask", + ClassName = "STAThreadTests", + MethodName = "STA_WithCompletedTask", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithCompletedTask", + FilePath = @"", + LineNumber = 74, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithCompletedTask_ModuleInitializer { @@ -738,7 +882,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithCompletedTask_Mod #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskRun_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskRun_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -812,6 +956,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskRun_TestSourc yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithTaskRun", + ClassName = "STAThreadTests", + MethodName = "STA_WithTaskRun", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithTaskRun", + FilePath = @"", + LineNumber = 83, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskRun_ModuleInitializer { @@ -830,7 +992,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskRun_ModuleIni #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithMultipleAwaits_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithMultipleAwaits_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -904,6 +1066,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithMultipleAwaits_Te yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithMultipleAwaits", + ClassName = "STAThreadTests", + MethodName = "STA_WithMultipleAwaits", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithMultipleAwaits", + FilePath = @"", + LineNumber = 98, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithMultipleAwaits_ModuleInitializer { @@ -922,7 +1102,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithMultipleAwaits_Mo #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithAsyncEnumerable_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithAsyncEnumerable_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -996,6 +1176,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithAsyncEnumerable_T yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithAsyncEnumerable", + ClassName = "STAThreadTests", + MethodName = "STA_WithAsyncEnumerable", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithAsyncEnumerable", + FilePath = @"", + LineNumber = 116, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithAsyncEnumerable_ModuleInitializer { @@ -1014,7 +1212,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithAsyncEnumerable_M #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskWhenAll_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskWhenAll_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1088,6 +1286,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskWhenAll_TestS yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithTaskWhenAll", + ClassName = "STAThreadTests", + MethodName = "STA_WithTaskWhenAll", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithTaskWhenAll", + FilePath = @"", + LineNumber = 130, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskWhenAll_ModuleInitializer { @@ -1106,7 +1322,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskWhenAll_Modul #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithExceptionHandling_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithExceptionHandling_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1180,6 +1396,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithExceptionHandling yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithExceptionHandling", + ClassName = "STAThreadTests", + MethodName = "STA_WithExceptionHandling", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithExceptionHandling", + FilePath = @"", + LineNumber = 147, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithExceptionHandling_ModuleInitializer { @@ -1198,7 +1432,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithExceptionHandling #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithThrowsNothingAssertion_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithThrowsNothingAssertion_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1272,6 +1506,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithThrowsNothingAsse yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithThrowsNothingAssertion", + ClassName = "STAThreadTests", + MethodName = "STA_WithThrowsNothingAssertion", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithThrowsNothingAssertion", + FilePath = @"", + LineNumber = 194, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithThrowsNothingAssertion_ModuleInitializer { @@ -1290,7 +1542,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithThrowsNothingAsse #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithFuncAssertion_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithFuncAssertion_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1364,6 +1616,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithFuncAssertion_Tes yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithFuncAssertion", + ClassName = "STAThreadTests", + MethodName = "STA_WithFuncAssertion", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithFuncAssertion", + FilePath = @"", + LineNumber = 211, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithFuncAssertion_ModuleInitializer { 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 b31c36229f..6c22b3f3c5 100644 --- a/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.Net4_7.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.Net4_7.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_With_STA_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_With_STA_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -77,6 +77,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_With_STA_TestSource : glo yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.With_STA", + ClassName = "STAThreadTests", + MethodName = "With_STA", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.With_STA", + FilePath = @"", + LineNumber = 14, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_With_STA_ModuleInitializer { @@ -95,7 +113,7 @@ internal static class TUnit_TestProject_STAThreadTests_With_STA_ModuleInitialize #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_Without_STA_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_Without_STA_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -168,6 +186,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_Without_STA_TestSource : yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.Without_STA", + ClassName = "STAThreadTests", + MethodName = "Without_STA", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.Without_STA", + FilePath = @"", + LineNumber = 20, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_Without_STA_ModuleInitializer { @@ -186,7 +222,7 @@ internal static class TUnit_TestProject_STAThreadTests_Without_STA_ModuleInitial #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithSimpleAwait_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithSimpleAwait_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -260,6 +296,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithSimpleAwait_TestS yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithSimpleAwait", + ClassName = "STAThreadTests", + MethodName = "STA_WithSimpleAwait", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithSimpleAwait", + FilePath = @"", + LineNumber = 26, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithSimpleAwait_ModuleInitializer { @@ -278,7 +332,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithSimpleAwait_Modul #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskYield_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskYield_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -352,6 +406,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskYield_TestSou yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithTaskYield", + ClassName = "STAThreadTests", + MethodName = "STA_WithTaskYield", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithTaskYield", + FilePath = @"", + LineNumber = 36, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskYield_ModuleInitializer { @@ -370,7 +442,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskYield_ModuleI #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithConfigureAwaitTrue_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithConfigureAwaitTrue_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -444,6 +516,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithConfigureAwaitTru yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithConfigureAwaitTrue", + ClassName = "STAThreadTests", + MethodName = "STA_WithConfigureAwaitTrue", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithConfigureAwaitTrue", + FilePath = @"", + LineNumber = 45, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithConfigureAwaitTrue_ModuleInitializer { @@ -462,7 +552,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithConfigureAwaitTru #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithNestedAsyncCalls_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithNestedAsyncCalls_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -536,6 +626,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithNestedAsyncCalls_ yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithNestedAsyncCalls", + ClassName = "STAThreadTests", + MethodName = "STA_WithNestedAsyncCalls", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithNestedAsyncCalls", + FilePath = @"", + LineNumber = 54, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithNestedAsyncCalls_ModuleInitializer { @@ -554,7 +662,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithNestedAsyncCalls_ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskFromResult_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskFromResult_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -628,6 +736,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskFromResult_Te yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithTaskFromResult", + ClassName = "STAThreadTests", + MethodName = "STA_WithTaskFromResult", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithTaskFromResult", + FilePath = @"", + LineNumber = 64, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskFromResult_ModuleInitializer { @@ -646,7 +772,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskFromResult_Mo #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithCompletedTask_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithCompletedTask_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -720,6 +846,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithCompletedTask_Tes yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithCompletedTask", + ClassName = "STAThreadTests", + MethodName = "STA_WithCompletedTask", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithCompletedTask", + FilePath = @"", + LineNumber = 74, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithCompletedTask_ModuleInitializer { @@ -738,7 +882,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithCompletedTask_Mod #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskRun_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskRun_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -812,6 +956,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskRun_TestSourc yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithTaskRun", + ClassName = "STAThreadTests", + MethodName = "STA_WithTaskRun", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithTaskRun", + FilePath = @"", + LineNumber = 83, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskRun_ModuleInitializer { @@ -830,7 +992,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskRun_ModuleIni #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithMultipleAwaits_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithMultipleAwaits_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -904,6 +1066,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithMultipleAwaits_Te yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithMultipleAwaits", + ClassName = "STAThreadTests", + MethodName = "STA_WithMultipleAwaits", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithMultipleAwaits", + FilePath = @"", + LineNumber = 98, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithMultipleAwaits_ModuleInitializer { @@ -922,7 +1102,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithMultipleAwaits_Mo #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithAsyncEnumerable_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithAsyncEnumerable_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -996,6 +1176,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithAsyncEnumerable_T yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithAsyncEnumerable", + ClassName = "STAThreadTests", + MethodName = "STA_WithAsyncEnumerable", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithAsyncEnumerable", + FilePath = @"", + LineNumber = 116, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithAsyncEnumerable_ModuleInitializer { @@ -1014,7 +1212,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithAsyncEnumerable_M #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskWhenAll_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskWhenAll_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1088,6 +1286,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskWhenAll_TestS yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithTaskWhenAll", + ClassName = "STAThreadTests", + MethodName = "STA_WithTaskWhenAll", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithTaskWhenAll", + FilePath = @"", + LineNumber = 130, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskWhenAll_ModuleInitializer { @@ -1106,7 +1322,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskWhenAll_Modul #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithExceptionHandling_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithExceptionHandling_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1180,6 +1396,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithExceptionHandling yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithExceptionHandling", + ClassName = "STAThreadTests", + MethodName = "STA_WithExceptionHandling", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithExceptionHandling", + FilePath = @"", + LineNumber = 147, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithExceptionHandling_ModuleInitializer { @@ -1198,7 +1432,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithExceptionHandling #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithThrowsNothingAssertion_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithThrowsNothingAssertion_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1272,6 +1506,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithThrowsNothingAsse yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithThrowsNothingAssertion", + ClassName = "STAThreadTests", + MethodName = "STA_WithThrowsNothingAssertion", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithThrowsNothingAssertion", + FilePath = @"", + LineNumber = 194, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithThrowsNothingAssertion_ModuleInitializer { @@ -1290,7 +1542,7 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithThrowsNothingAsse #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_STAThreadTests_STA_WithFuncAssertion_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_STAThreadTests_STA_WithFuncAssertion_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1364,6 +1616,24 @@ internal sealed class TUnit_TestProject_STAThreadTests_STA_WithFuncAssertion_Tes yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.STAThreadTests.STA_WithFuncAssertion", + ClassName = "STAThreadTests", + MethodName = "STA_WithFuncAssertion", + FullyQualifiedName = "TUnit.TestProject.STAThreadTests.STA_WithFuncAssertion", + FilePath = @"", + LineNumber = 211, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 100, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_STAThreadTests_STA_WithFuncAssertion_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/StringArgumentTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/StringArgumentTests.Test.verified.txt index 6e12c5b360..3d54d1dda5 100644 --- a/TUnit.Core.SourceGenerator.Tests/StringArgumentTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/StringArgumentTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_StringArgumentTests_Normal__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_StringArgumentTests_Normal__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -104,6 +104,24 @@ internal sealed class TUnit_TestProject_StringArgumentTests_Normal__string_TestS yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.StringArgumentTests.Normal", + ClassName = "StringArgumentTests", + MethodName = "Normal", + FullyQualifiedName = "TUnit.TestProject.StringArgumentTests.Normal", + FilePath = @"", + LineNumber = 8, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_StringArgumentTests_Normal__string_ModuleInitializer { @@ -122,7 +140,7 @@ internal static class TUnit_TestProject_StringArgumentTests_Normal__string_Modul #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_StringArgumentTests_Nullable__string__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_StringArgumentTests_Nullable__string__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -219,6 +237,24 @@ internal sealed class TUnit_TestProject_StringArgumentTests_Nullable__string__Te yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.StringArgumentTests.Nullable", + ClassName = "StringArgumentTests", + MethodName = "Nullable", + FullyQualifiedName = "TUnit.TestProject.StringArgumentTests.Nullable", + FilePath = @"", + LineNumber = 27, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_StringArgumentTests_Nullable__string__ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/Tests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests.Test.verified.txt index b14aa06aac..7f363670ad 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1304_Tests_TryParse_InvalidString_ReturnsFailure__string__CancellationToken_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1304_Tests_TryParse_InvalidString_ReturnsFailure__string__CancellationToken_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -104,6 +104,24 @@ internal sealed class TUnit_TestProject_Bugs__1304_Tests_TryParse_InvalidString_ yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1304.Tests.TryParse_InvalidString_ReturnsFailure", + ClassName = "Tests", + MethodName = "TryParse_InvalidString_ReturnsFailure", + FullyQualifiedName = "TUnit.TestProject.Bugs._1304.Tests.TryParse_InvalidString_ReturnsFailure", + FilePath = @"", + LineNumber = 9, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1304_Tests_TryParse_InvalidString_ReturnsFailure__string__CancellationToken_ModuleInitializer { @@ -122,7 +140,7 @@ internal static class TUnit_TestProject_Bugs__1304_Tests_TryParse_InvalidString_ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1304_Tests_Parse_InvalidString_ThrowsException__string__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1304_Tests_Parse_InvalidString_ThrowsException__string__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -215,6 +233,24 @@ internal sealed class TUnit_TestProject_Bugs__1304_Tests_Parse_InvalidString_Thr yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1304.Tests.Parse_InvalidString_ThrowsException", + ClassName = "Tests", + MethodName = "Parse_InvalidString_ThrowsException", + FullyQualifiedName = "TUnit.TestProject.Bugs._1304.Tests.Parse_InvalidString_ThrowsException", + FilePath = @"", + LineNumber = 26, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1304_Tests_Parse_InvalidString_ThrowsException__string__ModuleInitializer { @@ -233,7 +269,7 @@ internal static class TUnit_TestProject_Bugs__1304_Tests_Parse_InvalidString_Thr #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1304_Tests_TryParse_ValidString_ReturnsAccountId__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1304_Tests_TryParse_ValidString_ReturnsAccountId__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -323,6 +359,24 @@ internal sealed class TUnit_TestProject_Bugs__1304_Tests_TryParse_ValidString_Re yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1304.Tests.TryParse_ValidString_ReturnsAccountId", + ClassName = "Tests", + MethodName = "TryParse_ValidString_ReturnsAccountId", + FullyQualifiedName = "TUnit.TestProject.Bugs._1304.Tests.TryParse_ValidString_ReturnsAccountId", + FilePath = @"", + LineNumber = 38, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1304_Tests_TryParse_ValidString_ReturnsAccountId__string_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/Tests1538.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests1538.Test.verified.txt index 8851e6d423..8b79b17e5d 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests1538.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests1538.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1538_Tests_Eight_Args__bool_string__string__string__string__string__string__string__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1538_Tests_Eight_Args__bool_string__string__string__string__string__string__string__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -163,6 +163,24 @@ internal sealed class TUnit_TestProject_Bugs__1538_Tests_Eight_Args__bool_string yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1538.Tests.Eight_Args", + ClassName = "Tests", + MethodName = "Eight_Args", + FullyQualifiedName = "TUnit.TestProject.Bugs._1538.Tests.Eight_Args", + FilePath = @"", + LineNumber = 8, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1538_Tests_Eight_Args__bool_string__string__string__string__string__string__string__ModuleInitializer { @@ -181,7 +199,7 @@ internal static class TUnit_TestProject_Bugs__1538_Tests_Eight_Args__bool_string #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1538_Tests_SixteenArgs__bool_string__string__string__string__string__string__string__string__string__string__string__string__string__string__string__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1538_Tests_SixteenArgs__bool_string__string__string__string__string__string__string__string__string__string__string__string__string__string__string__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -397,6 +415,24 @@ internal sealed class TUnit_TestProject_Bugs__1538_Tests_SixteenArgs__bool_strin yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1538.Tests.SixteenArgs", + ClassName = "Tests", + MethodName = "SixteenArgs", + FullyQualifiedName = "TUnit.TestProject.Bugs._1538.Tests.SixteenArgs", + FilePath = @"", + LineNumber = 16, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1538_Tests_SixteenArgs__bool_string__string__string__string__string__string__string__string__string__string__string__string__string__string__string__ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/Tests1539.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests1539.Test.verified.txt index a80ac7803f..6ed2999635 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests1539.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests1539.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1539_Tests_Test_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1539_Tests_Test_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -77,6 +77,24 @@ internal sealed class TUnit_TestProject_Bugs__1539_Tests_Test_TestSource : globa yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1539.Tests.Test", + ClassName = "Tests", + MethodName = "Test", + FullyQualifiedName = "TUnit.TestProject.Bugs._1539.Tests.Test", + FilePath = @"", + LineNumber = 8, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1539_Tests_Test_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/Tests1589.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests1589.Test.verified.txt index 715c01f082..bf3c007286 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests1589.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests1589.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1589_MyTests_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1589_MyTests_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -90,6 +90,24 @@ internal sealed class TUnit_TestProject_Bugs__1589_MyTests_Test1_TestSource : gl yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1589.MyTests.Test1", + ClassName = "MyTests", + MethodName = "Test1", + FullyQualifiedName = "TUnit.TestProject.Bugs._1589.MyTests.Test1", + FilePath = @"", + LineNumber = 15, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1589_MyTests_Test1_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/Tests1594.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests1594.Test.verified.txt index 9d5d9f0ecd..eabb51929a 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests1594.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests1594.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1594_MyTests_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1594_MyTests_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -91,6 +91,24 @@ internal sealed class TUnit_TestProject_Bugs__1594_MyTests_Test1_TestSource : gl yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1594.MyTests.Test1", + ClassName = "MyTests", + MethodName = "Test1", + FullyQualifiedName = "TUnit.TestProject.Bugs._1594.MyTests.Test1", + FilePath = @"", + LineNumber = 15, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1594_MyTests_Test1_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/Tests1603.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests1603.Test.verified.txt index 1dbf27639e..1470f7ca61 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests1603.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests1603.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1603_Tests_Casted_Integer_To_Short_Converts__short_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1603_Tests_Casted_Integer_To_Short_Converts__short_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -92,6 +92,24 @@ internal sealed class TUnit_TestProject_Bugs__1603_Tests_Casted_Integer_To_Short yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1603.Tests.Casted_Integer_To_Short_Converts", + ClassName = "Tests", + MethodName = "Casted_Integer_To_Short_Converts", + FullyQualifiedName = "TUnit.TestProject.Bugs._1603.Tests.Casted_Integer_To_Short_Converts", + FilePath = @"", + LineNumber = 8, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1603_Tests_Casted_Integer_To_Short_Converts__short_ModuleInitializer { @@ -110,7 +128,7 @@ internal static class TUnit_TestProject_Bugs__1603_Tests_Casted_Integer_To_Short #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1603_Tests_Integer_To_Short_Converts__short_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1603_Tests_Integer_To_Short_Converts__short_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -199,6 +217,24 @@ internal sealed class TUnit_TestProject_Bugs__1603_Tests_Integer_To_Short_Conver yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1603.Tests.Integer_To_Short_Converts", + ClassName = "Tests", + MethodName = "Integer_To_Short_Converts", + FullyQualifiedName = "TUnit.TestProject.Bugs._1603.Tests.Integer_To_Short_Converts", + FilePath = @"", + LineNumber = 15, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1603_Tests_Integer_To_Short_Converts__short_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/Tests1692.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests1692.Test.verified.txt index e33251f183..07ee44784e 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests1692.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests1692.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1692_Tests_NullTest__string__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1692_Tests_NullTest__string__TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -93,6 +93,24 @@ internal sealed class TUnit_TestProject_Bugs__1692_Tests_NullTest__string__TestS yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1692.Tests.NullTest", + ClassName = "Tests", + MethodName = "NullTest", + FullyQualifiedName = "TUnit.TestProject.Bugs._1692.Tests.NullTest", + FilePath = @"", + LineNumber = 10, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1692_Tests_NullTest__string__ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/Tests1821.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests1821.Test.verified.txt index 2c961017ad..0410c5141c 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests1821.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests1821.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1821_Tests_MethodDataSource__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1821_Tests_MethodDataSource__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -108,6 +108,24 @@ internal sealed class TUnit_TestProject_Bugs__1821_Tests_MethodDataSource__strin yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1821.Tests.MethodDataSource", + ClassName = "Tests", + MethodName = "MethodDataSource", + FullyQualifiedName = "TUnit.TestProject.Bugs._1821.Tests.MethodDataSource", + FilePath = @"", + LineNumber = 9, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1821_Tests_MethodDataSource__string_ModuleInitializer { @@ -126,7 +144,7 @@ internal static class TUnit_TestProject_Bugs__1821_Tests_MethodDataSource__strin #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1821_Tests_MatrixDataSource__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1821_Tests_MatrixDataSource__string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -231,6 +249,24 @@ internal sealed class TUnit_TestProject_Bugs__1821_Tests_MatrixDataSource__strin yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1821.Tests.MatrixDataSource", + ClassName = "Tests", + MethodName = "MatrixDataSource", + FullyQualifiedName = "TUnit.TestProject.Bugs._1821.Tests.MatrixDataSource", + FilePath = @"", + LineNumber = 16, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1821_Tests_MatrixDataSource__string_ModuleInitializer { 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 d867b43a61..c0cc4cab7f 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet10_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet10_0.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -74,6 +74,24 @@ internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1889.DerivedTest.Test1", + ClassName = "DerivedTest", + MethodName = "Test1", + FullyQualifiedName = "TUnit.TestProject.Bugs._1889.DerivedTest.Test1", + FilePath = @"", + LineNumber = 6, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_ModuleInitializer { @@ -92,7 +110,7 @@ internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_ModuleIniti #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -183,6 +201,24 @@ internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestS yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1889.DerivedTest.Test2", + ClassName = "DerivedTest", + MethodName = "Test2", + FullyQualifiedName = "TUnit.TestProject.Bugs._1889.DerivedTest.Test2", + FilePath = @"", + LineNumber = 6, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_ModuleInitializer { @@ -201,7 +237,7 @@ internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_Modul #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -293,6 +329,24 @@ internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestS yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1889.DerivedTest.Test3", + ClassName = "DerivedTest", + MethodName = "Test3", + FullyQualifiedName = "TUnit.TestProject.Bugs._1889.DerivedTest.Test3", + FilePath = @"", + LineNumber = 6, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_ModuleInitializer { 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 d867b43a61..c0cc4cab7f 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet8_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet8_0.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -74,6 +74,24 @@ internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1889.DerivedTest.Test1", + ClassName = "DerivedTest", + MethodName = "Test1", + FullyQualifiedName = "TUnit.TestProject.Bugs._1889.DerivedTest.Test1", + FilePath = @"", + LineNumber = 6, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_ModuleInitializer { @@ -92,7 +110,7 @@ internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_ModuleIniti #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -183,6 +201,24 @@ internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestS yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1889.DerivedTest.Test2", + ClassName = "DerivedTest", + MethodName = "Test2", + FullyQualifiedName = "TUnit.TestProject.Bugs._1889.DerivedTest.Test2", + FilePath = @"", + LineNumber = 6, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_ModuleInitializer { @@ -201,7 +237,7 @@ internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_Modul #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -293,6 +329,24 @@ internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestS yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1889.DerivedTest.Test3", + ClassName = "DerivedTest", + MethodName = "Test3", + FullyQualifiedName = "TUnit.TestProject.Bugs._1889.DerivedTest.Test3", + FilePath = @"", + LineNumber = 6, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_ModuleInitializer { 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 d867b43a61..c0cc4cab7f 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet9_0.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.DotNet9_0.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -74,6 +74,24 @@ internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1889.DerivedTest.Test1", + ClassName = "DerivedTest", + MethodName = "Test1", + FullyQualifiedName = "TUnit.TestProject.Bugs._1889.DerivedTest.Test1", + FilePath = @"", + LineNumber = 6, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_ModuleInitializer { @@ -92,7 +110,7 @@ internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_ModuleIniti #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -183,6 +201,24 @@ internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestS yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1889.DerivedTest.Test2", + ClassName = "DerivedTest", + MethodName = "Test2", + FullyQualifiedName = "TUnit.TestProject.Bugs._1889.DerivedTest.Test2", + FilePath = @"", + LineNumber = 6, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_ModuleInitializer { @@ -201,7 +237,7 @@ internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_Modul #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -293,6 +329,24 @@ internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestS yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1889.DerivedTest.Test3", + ClassName = "DerivedTest", + MethodName = "Test3", + FullyQualifiedName = "TUnit.TestProject.Bugs._1889.DerivedTest.Test3", + FilePath = @"", + LineNumber = 6, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_ModuleInitializer { 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 eab0c4bca0..f6fcc3784b 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.Net4_7.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests1889.Test.Net4_7.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -74,6 +74,24 @@ internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_TestSource yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1889.DerivedTest.Test1", + ClassName = "DerivedTest", + MethodName = "Test1", + FullyQualifiedName = "TUnit.TestProject.Bugs._1889.DerivedTest.Test1", + FilePath = @"", + LineNumber = 6, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_ModuleInitializer { @@ -92,7 +110,7 @@ internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test1_ModuleIniti #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -183,6 +201,24 @@ internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_TestS yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1889.DerivedTest.Test2", + ClassName = "DerivedTest", + MethodName = "Test2", + FullyQualifiedName = "TUnit.TestProject.Bugs._1889.DerivedTest.Test2", + FilePath = @"", + LineNumber = 6, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_ModuleInitializer { @@ -201,7 +237,7 @@ internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test2__bool_Modul #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -293,6 +329,24 @@ internal sealed class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_TestS yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1889.DerivedTest.Test3", + ClassName = "DerivedTest", + MethodName = "Test3", + FullyQualifiedName = "TUnit.TestProject.Bugs._1889.DerivedTest.Test3", + FilePath = @"", + LineNumber = 6, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1889_DerivedTest_Test3__bool_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/Tests1899.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests1899.Test.verified.txt index ac8a778372..891398bc6f 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests1899.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests1899.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__1899_DerivedTest_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__1899_DerivedTest_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -74,6 +74,24 @@ internal sealed class TUnit_TestProject_Bugs__1899_DerivedTest_Test1_TestSource yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._1899.DerivedTest.Test1", + ClassName = "DerivedTest", + MethodName = "Test1", + FullyQualifiedName = "TUnit.TestProject.Bugs._1899.DerivedTest.Test1", + FilePath = @"", + LineNumber = 6, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__1899_DerivedTest_Test1_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/Tests2083.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests2083.Test.verified.txt index 38dbc9f180..ea8c14b3aa 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests2083.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests2083.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__2083_Tests_MyTest__long_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__2083_Tests_MyTest__long_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -98,6 +98,24 @@ internal sealed class TUnit_TestProject_Bugs__2083_Tests_MyTest__long_TestSource yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._2083.Tests.MyTest", + ClassName = "Tests", + MethodName = "MyTest", + FullyQualifiedName = "TUnit.TestProject.Bugs._2083.Tests.MyTest", + FilePath = @"", + LineNumber = 8, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__2083_Tests_MyTest__long_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/Tests2085.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests2085.Test.verified.txt index c5d52626cf..b65a04f064 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests2085.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests2085.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__2085_Tests_Double_SpecialConsts__double_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__2085_Tests_Double_SpecialConsts__double_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -92,6 +92,24 @@ internal sealed class TUnit_TestProject_Bugs__2085_Tests_Double_SpecialConsts__d yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._2085.Tests.Double_SpecialConsts", + ClassName = "Tests", + MethodName = "Double_SpecialConsts", + FullyQualifiedName = "TUnit.TestProject.Bugs._2085.Tests.Double_SpecialConsts", + FilePath = @"", + LineNumber = 8, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__2085_Tests_Double_SpecialConsts__double_ModuleInitializer { @@ -110,7 +128,7 @@ internal static class TUnit_TestProject_Bugs__2085_Tests_Double_SpecialConsts__d #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__2085_Tests_Float_SpecialConsts__float_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__2085_Tests_Float_SpecialConsts__float_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -199,6 +217,24 @@ internal sealed class TUnit_TestProject_Bugs__2085_Tests_Float_SpecialConsts__fl yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._2085.Tests.Float_SpecialConsts", + ClassName = "Tests", + MethodName = "Float_SpecialConsts", + FullyQualifiedName = "TUnit.TestProject.Bugs._2085.Tests.Float_SpecialConsts", + FilePath = @"", + LineNumber = 15, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__2085_Tests_Float_SpecialConsts__float_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/Tests2112.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests2112.Test.verified.txt index 269c08b65f..a0534a8048 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests2112.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests2112.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__2112_Tests_Test__int_long___TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__2112_Tests_Test__int_long___TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -131,6 +131,24 @@ internal sealed class TUnit_TestProject_Bugs__2112_Tests_Test__int_long___TestSo yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._2112.Tests.Test", + ClassName = "Tests", + MethodName = "Test", + FullyQualifiedName = "TUnit.TestProject.Bugs._2112.Tests.Test", + FilePath = @"", + LineNumber = 8, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__2112_Tests_Test__int_long___ModuleInitializer { @@ -149,7 +167,7 @@ internal static class TUnit_TestProject_Bugs__2112_Tests_Test__int_long___Module #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__2112_Tests_Test2__int_long___TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__2112_Tests_Test2__int_long___TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -277,6 +295,24 @@ internal sealed class TUnit_TestProject_Bugs__2112_Tests_Test2__int_long___TestS yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._2112.Tests.Test2", + ClassName = "Tests", + MethodName = "Test2", + FullyQualifiedName = "TUnit.TestProject.Bugs._2112.Tests.Test2", + FilePath = @"", + LineNumber = 15, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__2112_Tests_Test2__int_long___ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/Tests2136.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Tests2136.Test.verified.txt index bc3a3320ab..2369a1de2a 100644 --- a/TUnit.Core.SourceGenerator.Tests/Tests2136.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/Tests2136.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_Bugs__2136_Tests_GenericArgumentsTest__T_string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_Bugs__2136_Tests_GenericArgumentsTest__T_string_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -529,6 +529,24 @@ internal sealed class TUnit_TestProject_Bugs__2136_Tests_GenericArgumentsTest__T yield return genericMetadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.Bugs._2136.Tests.GenericArgumentsTest", + ClassName = "Tests", + MethodName = "GenericArgumentsTest", + FullyQualifiedName = "TUnit.TestProject.Bugs._2136.Tests.GenericArgumentsTest", + FilePath = @"", + LineNumber = 8, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_Bugs__2136_Tests_GenericArgumentsTest__T_string_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/TimeoutCancellationTokenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/TimeoutCancellationTokenTests.Test.verified.txt index b4e8b9f589..533dac3efe 100644 --- a/TUnit.Core.SourceGenerator.Tests/TimeoutCancellationTokenTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/TimeoutCancellationTokenTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_TimeoutCancellationTokenTests_DefaultTest__CancellationToken_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_TimeoutCancellationTokenTests_DefaultTest__CancellationToken_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -119,6 +119,24 @@ internal sealed class TUnit_TestProject_TimeoutCancellationTokenTests_DefaultTes yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.TimeoutCancellationTokenTests.DefaultTest", + ClassName = "TimeoutCancellationTokenTests", + MethodName = "DefaultTest", + FullyQualifiedName = "TUnit.TestProject.TimeoutCancellationTokenTests.DefaultTest", + FilePath = @"", + LineNumber = 14, + Categories = new string[] { "Timeout Cancellation Token Tests" }, + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_TimeoutCancellationTokenTests_DefaultTest__CancellationToken_ModuleInitializer { @@ -137,7 +155,7 @@ internal static class TUnit_TestProject_TimeoutCancellationTokenTests_DefaultTes #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_TimeoutCancellationTokenTests_BasicTest__CancellationToken_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_TimeoutCancellationTokenTests_BasicTest__CancellationToken_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -255,6 +273,24 @@ internal sealed class TUnit_TestProject_TimeoutCancellationTokenTests_BasicTest_ yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.TimeoutCancellationTokenTests.BasicTest", + ClassName = "TimeoutCancellationTokenTests", + MethodName = "BasicTest", + FullyQualifiedName = "TUnit.TestProject.TimeoutCancellationTokenTests.BasicTest", + FilePath = @"", + LineNumber = 21, + Categories = new string[] { "Blah", "Timeout Cancellation Token Tests" }, + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_TimeoutCancellationTokenTests_BasicTest__CancellationToken_ModuleInitializer { @@ -273,7 +309,7 @@ internal static class TUnit_TestProject_TimeoutCancellationTokenTests_BasicTest_ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_TimeoutCancellationTokenTests_InheritedTimeoutAttribute__CancellationToken_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_TimeoutCancellationTokenTests_InheritedTimeoutAttribute__CancellationToken_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -390,6 +426,24 @@ internal sealed class TUnit_TestProject_TimeoutCancellationTokenTests_InheritedT yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.TimeoutCancellationTokenTests.InheritedTimeoutAttribute", + ClassName = "TimeoutCancellationTokenTests", + MethodName = "InheritedTimeoutAttribute", + FullyQualifiedName = "TUnit.TestProject.TimeoutCancellationTokenTests.InheritedTimeoutAttribute", + FilePath = @"", + LineNumber = 30, + Categories = new string[] { "Timeout Cancellation Token Tests" }, + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_TimeoutCancellationTokenTests_InheritedTimeoutAttribute__CancellationToken_ModuleInitializer { @@ -408,7 +462,7 @@ internal static class TUnit_TestProject_TimeoutCancellationTokenTests_InheritedT #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_TimeoutCancellationTokenTests_DataTest__int_CancellationToken_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_TimeoutCancellationTokenTests_DataTest__int_CancellationToken_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -544,6 +598,24 @@ internal sealed class TUnit_TestProject_TimeoutCancellationTokenTests_DataTest__ yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.TimeoutCancellationTokenTests.DataTest", + ClassName = "TimeoutCancellationTokenTests", + MethodName = "DataTest", + FullyQualifiedName = "TUnit.TestProject.TimeoutCancellationTokenTests.DataTest", + FilePath = @"", + LineNumber = 38, + Categories = new string[] { "Timeout Cancellation Token Tests" }, + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_TimeoutCancellationTokenTests_DataTest__int_CancellationToken_ModuleInitializer { @@ -562,7 +634,7 @@ internal static class TUnit_TestProject_TimeoutCancellationTokenTests_DataTest__ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_TimeoutCancellationTokenTests_DataSourceTest__int_CancellationToken_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_TimeoutCancellationTokenTests_DataSourceTest__int_CancellationToken_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -719,6 +791,24 @@ internal sealed class TUnit_TestProject_TimeoutCancellationTokenTests_DataSource yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.TimeoutCancellationTokenTests.DataSourceTest", + ClassName = "TimeoutCancellationTokenTests", + MethodName = "DataSourceTest", + FullyQualifiedName = "TUnit.TestProject.TimeoutCancellationTokenTests.DataSourceTest", + FilePath = @"", + LineNumber = 48, + Categories = new string[] { "Timeout Cancellation Token Tests" }, + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_TimeoutCancellationTokenTests_DataSourceTest__int_CancellationToken_ModuleInitializer { @@ -737,7 +827,7 @@ internal static class TUnit_TestProject_TimeoutCancellationTokenTests_DataSource #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_TimeoutCancellationTokenTests_MatrixTest__int_CancellationToken_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_TimeoutCancellationTokenTests_MatrixTest__int_CancellationToken_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -874,6 +964,24 @@ internal sealed class TUnit_TestProject_TimeoutCancellationTokenTests_MatrixTest yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.TimeoutCancellationTokenTests.MatrixTest", + ClassName = "TimeoutCancellationTokenTests", + MethodName = "MatrixTest", + FullyQualifiedName = "TUnit.TestProject.TimeoutCancellationTokenTests.MatrixTest", + FilePath = @"", + LineNumber = 58, + Categories = new string[] { "Blah", "Timeout Cancellation Token Tests" }, + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_TimeoutCancellationTokenTests_MatrixTest__int_CancellationToken_ModuleInitializer { @@ -892,7 +1000,7 @@ internal static class TUnit_TestProject_TimeoutCancellationTokenTests_MatrixTest #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_TimeoutDoesNotFireTests_QuickTestDoesNotTimeout__CancellationToken_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_TimeoutDoesNotFireTests_QuickTestDoesNotTimeout__CancellationToken_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1009,6 +1117,24 @@ internal sealed class TUnit_TestProject_TimeoutDoesNotFireTests_QuickTestDoesNot yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.TimeoutDoesNotFireTests.QuickTestDoesNotTimeout", + ClassName = "TimeoutDoesNotFireTests", + MethodName = "QuickTestDoesNotTimeout", + FullyQualifiedName = "TUnit.TestProject.TimeoutDoesNotFireTests.QuickTestDoesNotTimeout", + FilePath = @"", + LineNumber = 86, + Categories = new string[] { "Timeout Cancellation Token Tests" }, + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_TimeoutDoesNotFireTests_QuickTestDoesNotTimeout__CancellationToken_ModuleInitializer { @@ -1027,7 +1153,7 @@ internal static class TUnit_TestProject_TimeoutDoesNotFireTests_QuickTestDoesNot #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_CancellationTokenTriggeredTests_CancellationTokenIsTriggered__CancellationToken_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_CancellationTokenTriggeredTests_CancellationTokenIsTriggered__CancellationToken_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -1144,6 +1270,24 @@ internal sealed class TUnit_TestProject_CancellationTokenTriggeredTests_Cancella yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.CancellationTokenTriggeredTests.CancellationTokenIsTriggered", + ClassName = "CancellationTokenTriggeredTests", + MethodName = "CancellationTokenIsTriggered", + FullyQualifiedName = "TUnit.TestProject.CancellationTokenTriggeredTests.CancellationTokenIsTriggered", + FilePath = @"", + LineNumber = 106, + Categories = new string[] { "Timeout Cancellation Token Tests" }, + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_CancellationTokenTriggeredTests_CancellationTokenIsTriggered__CancellationToken_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/TupleDataSourceDrivenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/TupleDataSourceDrivenTests.Test.verified.txt index 581ace613b..e5f4c724c9 100644 --- a/TUnit.Core.SourceGenerator.Tests/TupleDataSourceDrivenTests.Test.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/TupleDataSourceDrivenTests.Test.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_TupleDataSourceDrivenTests_DataSource_TupleMethod__int_string_bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_TupleDataSourceDrivenTests_DataSource_TupleMethod__int_string_bool_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -118,6 +118,24 @@ internal sealed class TUnit_TestProject_TupleDataSourceDrivenTests_DataSource_Tu yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.TupleDataSourceDrivenTests.DataSource_TupleMethod", + ClassName = "TupleDataSourceDrivenTests", + MethodName = "DataSource_TupleMethod", + FullyQualifiedName = "TUnit.TestProject.TupleDataSourceDrivenTests.DataSource_TupleMethod", + FilePath = @"", + LineNumber = 8, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_TupleDataSourceDrivenTests_DataSource_TupleMethod__int_string_bool_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_AotSafeDataSourceFactories.verified.txt b/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_AotSafeDataSourceFactories.verified.txt index 7190aae3f4..bfa3641934 100644 --- a/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_AotSafeDataSourceFactories.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_AotSafeDataSourceFactories.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_AotDataSourceTest_TestWithDataSource__int_int_int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_AotDataSourceTest_TestWithDataSource__int_int_int_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -107,6 +107,24 @@ internal sealed class TUnit_TestProject_AotDataSourceTest_TestWithDataSource__in yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.AotDataSourceTest.TestWithDataSource", + ClassName = "AotDataSourceTest", + MethodName = "TestWithDataSource", + FullyQualifiedName = "TUnit.TestProject.AotDataSourceTest.TestWithDataSource", + FilePath = @"", + LineNumber = 7, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = true, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_AotDataSourceTest_TestWithDataSource__int_int_int_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_ConfigurationSupport.verified.txt b/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_ConfigurationSupport.verified.txt index 323116974b..49c2ad7d4e 100644 --- a/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_ConfigurationSupport.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_ConfigurationSupport.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ConfigurationTest_TestWithConfiguration_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ConfigurationTest_TestWithConfiguration_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -72,6 +72,24 @@ internal sealed class TUnit_TestProject_ConfigurationTest_TestWithConfiguration_ yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ConfigurationTest.TestWithConfiguration", + ClassName = "ConfigurationTest", + MethodName = "TestWithConfiguration", + FullyQualifiedName = "TUnit.TestProject.ConfigurationTest.TestWithConfiguration", + FilePath = @"", + LineNumber = 7, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ConfigurationTest_TestWithConfiguration_ModuleInitializer { 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 c545f3a741..8d6f3991e6 100644 --- a/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_ModuleInitializer_Generation.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_ModuleInitializer_Generation.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_ModuleInitializerTest_TestWithModuleInit_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_ModuleInitializerTest_TestWithModuleInit_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -72,6 +72,24 @@ internal sealed class TUnit_TestProject_ModuleInitializerTest_TestWithModuleInit yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.ModuleInitializerTest.TestWithModuleInit", + ClassName = "ModuleInitializerTest", + MethodName = "TestWithModuleInit", + FullyQualifiedName = "TUnit.TestProject.ModuleInitializerTest.TestWithModuleInit", + FilePath = @"", + LineNumber = 8, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_ModuleInitializerTest_TestWithModuleInit_ModuleInitializer { 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 5754b8bd4e..7d73c778cd 100644 --- a/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_StronglyTypedDelegates_Generation.verified.txt +++ b/TUnit.Core.SourceGenerator.Tests/UnifiedReflectionFreeTests.Test_StronglyTypedDelegates_Generation.verified.txt @@ -3,7 +3,7 @@ #nullable enable namespace TUnit.Generated; -internal sealed class TUnit_TestProject_TypedDelegateTest_TestWithDelegate_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource +internal sealed class TUnit_TestProject_TypedDelegateTest_TestWithDelegate_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource { public async global::System.Collections.Generic.IAsyncEnumerable GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default) { @@ -72,6 +72,24 @@ internal sealed class TUnit_TestProject_TypedDelegateTest_TestWithDelegate_TestS yield return metadata; yield break; } + public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors() + { + yield return new global::TUnit.Core.TestDescriptor + { + TestId = "TUnit.TestProject.TypedDelegateTest.TestWithDelegate", + ClassName = "TypedDelegateTest", + MethodName = "TestWithDelegate", + FullyQualifiedName = "TUnit.TestProject.TypedDelegateTest.TestWithDelegate", + FilePath = @"", + LineNumber = 7, + Categories = global::System.Array.Empty(), + Properties = global::System.Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + DependsOn = global::System.Array.Empty(), + Materializer = GetTestsAsync + }; + } } internal static class TUnit_TestProject_TypedDelegateTest_TestWithDelegate_ModuleInitializer { diff --git a/TUnit.Core.SourceGenerator/CodeGenerators/AssemblyLoaderGenerator.cs b/TUnit.Core.SourceGenerator/CodeGenerators/AssemblyLoaderGenerator.cs index 0c30bd8995..ff709817bf 100644 --- a/TUnit.Core.SourceGenerator/CodeGenerators/AssemblyLoaderGenerator.cs +++ b/TUnit.Core.SourceGenerator/CodeGenerators/AssemblyLoaderGenerator.cs @@ -42,6 +42,9 @@ public void Initialize(IncrementalGeneratorInitializationContext context) private void GenerateCode(SourceProductionContext context, Compilation compilation) { + // Find TUnit.Core assembly - only assemblies referencing this can contain tests + var tunitCoreAssembly = FindTUnitCoreAssembly(compilation); + // Collect all assemblies: start with the current assembly, then traverse references var visitedAssemblies = new HashSet(SymbolEqualityComparer.Default); @@ -69,6 +72,11 @@ private void GenerateCode(SourceProductionContext context, Compilation compilati } } + // Build set of assemblies that reference TUnit.Core (directly or transitively) + var assembliesReferencingTUnit = tunitCoreAssembly != null + ? FindAssembliesReferencingTUnitCore(visitedAssemblies, tunitCoreAssembly) + : visitedAssemblies; // Fallback: register all if TUnit.Core not found + var sourceBuilder = new CodeWriter(); sourceBuilder.AppendLine("[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute]"); @@ -78,7 +86,7 @@ private void GenerateCode(SourceProductionContext context, Compilation compilati sourceBuilder.AppendLine("[global::System.Runtime.CompilerServices.ModuleInitializer]"); using (sourceBuilder.BeginBlock("public static void Initialize()")) { - foreach (var assembly in visitedAssemblies) + foreach (var assembly in assembliesReferencingTUnit) { WriteAssemblyLoad(sourceBuilder, assembly, compilation); } @@ -87,6 +95,75 @@ private void GenerateCode(SourceProductionContext context, Compilation compilati context.AddSource("AssemblyLoader.g.cs", sourceBuilder.ToString()); } + private static IAssemblySymbol? FindTUnitCoreAssembly(Compilation compilation) + { + // Check current assembly first + if (compilation.Assembly.Name == "TUnit.Core") + { + return compilation.Assembly; + } + + // Search referenced assemblies + foreach (var reference in compilation.References) + { + if (compilation.GetAssemblyOrModuleSymbol(reference) is IAssemblySymbol assemblySymbol + && assemblySymbol.Name == "TUnit.Core") + { + return assemblySymbol; + } + } + + return null; + } + + private static HashSet FindAssembliesReferencingTUnitCore( + HashSet allAssemblies, + IAssemblySymbol tunitCoreAssembly) + { + // Build reverse dependency graph: for each assembly, which assemblies reference it? + var referencedBy = new Dictionary>(SymbolEqualityComparer.Default); + + foreach (var assembly in allAssemblies) + { + foreach (var referenced in assembly.Modules.SelectMany(m => m.ReferencedAssemblySymbols)) + { + if (!referencedBy.TryGetValue(referenced, out var list)) + { + list = []; + referencedBy[referenced] = list; + } + list.Add(assembly); + } + } + + // BFS from TUnit.Core to find all assemblies that transitively reference it + var result = new HashSet(SymbolEqualityComparer.Default); + var queue = new Queue(); + + // Start with TUnit.Core itself + result.Add(tunitCoreAssembly); + queue.Enqueue(tunitCoreAssembly); + + while (queue.Count > 0) + { + var current = queue.Dequeue(); + + // Find all assemblies that reference the current assembly + if (referencedBy.TryGetValue(current, out var dependents)) + { + foreach (var dependent in dependents) + { + if (result.Add(dependent)) + { + queue.Enqueue(dependent); + } + } + } + } + + return result; + } + private static void WriteAssemblyLoad(ICodeWriter sourceBuilder, IAssemblySymbol assembly, Compilation compilation) { if (IsSystemAssembly(assembly)) @@ -94,6 +171,12 @@ private static void WriteAssemblyLoad(ICodeWriter sourceBuilder, IAssemblySymbol return; } + // Skip TUnit framework assemblies - they don't contain user tests + if (IsTUnitFrameworkAssembly(assembly)) + { + return; + } + // Only emit assembly load code if the assembly has a physical location that exists if (!HasPhysicalLocation(assembly, compilation)) { @@ -103,6 +186,19 @@ private static void WriteAssemblyLoad(ICodeWriter sourceBuilder, IAssemblySymbol sourceBuilder.AppendLine($"global::TUnit.Core.SourceRegistrar.RegisterAssembly(() => global::System.Reflection.Assembly.Load(\"{GetAssemblyFullName(assembly)}\"));"); } + private static bool IsTUnitFrameworkAssembly(IAssemblySymbol assembly) + { + var name = assembly.Name; + return name == "TUnit" || + name == "TUnit.Core" || + name == "TUnit.Engine" || + name == "TUnit.Assertions" || + name == "TUnit.Assertions.FSharp" || + name == "TUnit.Playwright" || + name == "TUnit.AspNetCore" || + name.StartsWith("TUnit.Assertions.", StringComparison.Ordinal); + } + private static bool HasPhysicalLocation(IAssemblySymbol assembly, Compilation compilation) { // Find the corresponding MetadataReference for this assembly diff --git a/TUnit.Core.SourceGenerator/Generators/TestMetadataGenerator.cs b/TUnit.Core.SourceGenerator/Generators/TestMetadataGenerator.cs index 89d65e6431..794954eab0 100644 --- a/TUnit.Core.SourceGenerator/Generators/TestMetadataGenerator.cs +++ b/TUnit.Core.SourceGenerator/Generators/TestMetadataGenerator.cs @@ -283,7 +283,7 @@ private static void GenerateTestMetadata(CodeWriter writer, TestMethodMetadata t var uniqueClassName = FileNameHelper.GetDeterministicFileNameForMethod(testMethod.TypeSymbol, testMethod.MethodSymbol) .Replace(".g.cs", "_TestSource"); - writer.AppendLine($"internal sealed class {uniqueClassName} : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource"); + writer.AppendLine($"internal sealed class {uniqueClassName} : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource"); writer.AppendLine("{"); writer.Indent(); @@ -339,6 +339,11 @@ private static void GenerateTestMetadata(CodeWriter writer, TestMethodMetadata t writer.Unindent(); writer.AppendLine("}"); + writer.AppendLine(); + + // Generate EnumerateTestDescriptors method for fast filtering + GenerateEnumerateTestDescriptors(writer, testMethod, className); + writer.Unindent(); writer.AppendLine("}"); @@ -2031,6 +2036,313 @@ private static void GenerateConcreteTestInvoker(CodeWriter writer, TestMethodMet } + private static void GenerateEnumerateTestDescriptors(CodeWriter writer, TestMethodMetadata testMethod, string className) + { + var methodName = testMethod.MethodSymbol.Name; + var namespaceName = testMethod.TypeSymbol.ContainingNamespace?.ToDisplayString() ?? ""; + var simpleClassName = testMethod.TypeSymbol.Name; + var fullyQualifiedName = string.IsNullOrEmpty(namespaceName) + ? $"{simpleClassName}.{methodName}" + : $"{namespaceName}.{simpleClassName}.{methodName}"; + + // Extract categories from CategoryAttribute at compile time + var categories = ExtractCategories(testMethod); + var categoriesArray = categories.Length == 0 + ? "global::System.Array.Empty()" + : $"new string[] {{ {string.Join(", ", categories.Select(c => $"\"{EscapeString(c)}\""))} }}"; + + // Extract properties from PropertyAttribute at compile time + var properties = ExtractProperties(testMethod); + var propertiesArray = properties.Length == 0 + ? "global::System.Array.Empty()" + : $"new string[] {{ {string.Join(", ", properties.Select(p => $"\"{EscapeString(p)}\""))} }}"; + + // Check if test has data sources + var hasDataSource = HasDataSources(testMethod); + + // Extract repeat count from RepeatAttribute + var repeatCount = ExtractRepeatCount(testMethod); + + // Extract dependencies from DependsOnAttribute + var dependsOn = ExtractDependsOn(testMethod); + var dependsOnArray = dependsOn.Length == 0 + ? "global::System.Array.Empty()" + : $"new string[] {{ {string.Join(", ", dependsOn.Select(d => $"\"{EscapeString(d)}\""))} }}"; + + writer.AppendLine("public global::System.Collections.Generic.IEnumerable EnumerateTestDescriptors()"); + writer.AppendLine("{"); + writer.Indent(); + + writer.AppendLine("yield return new global::TUnit.Core.TestDescriptor"); + writer.AppendLine("{"); + writer.Indent(); + + writer.AppendLine($"TestId = \"{EscapeString(fullyQualifiedName)}\","); + writer.AppendLine($"ClassName = \"{EscapeString(simpleClassName)}\","); + writer.AppendLine($"MethodName = \"{EscapeString(methodName)}\","); + writer.AppendLine($"FullyQualifiedName = \"{EscapeString(fullyQualifiedName)}\","); + writer.AppendLine($"FilePath = @\"{(testMethod.FilePath ?? "").Replace("\\", "\\\\")}\","); + writer.AppendLine($"LineNumber = {testMethod.LineNumber},"); + writer.AppendLine($"Categories = {categoriesArray},"); + writer.AppendLine($"Properties = {propertiesArray},"); + writer.AppendLine($"HasDataSource = {(hasDataSource ? "true" : "false")},"); + writer.AppendLine($"RepeatCount = {repeatCount},"); + writer.AppendLine($"DependsOn = {dependsOnArray},"); + writer.AppendLine("Materializer = GetTestsAsync"); + + writer.Unindent(); + writer.AppendLine("};"); + + writer.Unindent(); + writer.AppendLine("}"); + } + + private static string[] ExtractCategories(TestMethodMetadata testMethod) + { + var categories = new List(); + + // Check method attributes + foreach (var attr in testMethod.MethodAttributes) + { + if (attr.AttributeClass?.Name == "CategoryAttribute" && + attr.ConstructorArguments.Length > 0 && + attr.ConstructorArguments[0].Value is string category) + { + categories.Add(category); + } + } + + // Check class attributes + foreach (var attr in testMethod.TypeSymbol.GetAttributes()) + { + if (attr.AttributeClass?.Name == "CategoryAttribute" && + attr.ConstructorArguments.Length > 0 && + attr.ConstructorArguments[0].Value is string category) + { + categories.Add(category); + } + } + + // Check assembly attributes + foreach (var attr in testMethod.TypeSymbol.ContainingAssembly.GetAttributes()) + { + if (attr.AttributeClass?.Name == "CategoryAttribute" && + attr.ConstructorArguments.Length > 0 && + attr.ConstructorArguments[0].Value is string category) + { + categories.Add(category); + } + } + + return categories.Distinct().ToArray(); + } + + private static string[] ExtractProperties(TestMethodMetadata testMethod) + { + var properties = new List(); + + // Check method attributes + foreach (var attr in testMethod.MethodAttributes) + { + if (attr.AttributeClass?.Name == "PropertyAttribute" && + attr.ConstructorArguments.Length >= 2 && + attr.ConstructorArguments[0].Value is string key && + attr.ConstructorArguments[1].Value is string value) + { + properties.Add($"{key}={value}"); + } + } + + // Check class attributes + foreach (var attr in testMethod.TypeSymbol.GetAttributes()) + { + if (attr.AttributeClass?.Name == "PropertyAttribute" && + attr.ConstructorArguments.Length >= 2 && + attr.ConstructorArguments[0].Value is string key && + attr.ConstructorArguments[1].Value is string value) + { + properties.Add($"{key}={value}"); + } + } + + // Check assembly attributes + foreach (var attr in testMethod.TypeSymbol.ContainingAssembly.GetAttributes()) + { + if (attr.AttributeClass?.Name == "PropertyAttribute" && + attr.ConstructorArguments.Length >= 2 && + attr.ConstructorArguments[0].Value is string key && + attr.ConstructorArguments[1].Value is string value) + { + properties.Add($"{key}={value}"); + } + } + + return properties.Distinct().ToArray(); + } + + private static bool HasDataSources(TestMethodMetadata testMethod) + { + // Check for data source attributes on the method + foreach (var attr in testMethod.MethodAttributes) + { + if (DataSourceAttributeHelper.IsDataSourceAttribute(attr.AttributeClass)) + { + return true; + } + } + + // Check for data source attributes on the class + foreach (var attr in testMethod.TypeSymbol.GetAttributes()) + { + if (DataSourceAttributeHelper.IsDataSourceAttribute(attr.AttributeClass)) + { + return true; + } + } + + return false; + } + + private static int ExtractRepeatCount(TestMethodMetadata testMethod) + { + // Check method attributes first + foreach (var attr in testMethod.MethodAttributes) + { + if (attr.AttributeClass?.Name == "RepeatAttribute" && + attr.ConstructorArguments.Length > 0 && + attr.ConstructorArguments[0].Value is int count) + { + return count; + } + } + + // Check class attributes + foreach (var attr in testMethod.TypeSymbol.GetAttributes()) + { + if (attr.AttributeClass?.Name == "RepeatAttribute" && + attr.ConstructorArguments.Length > 0 && + attr.ConstructorArguments[0].Value is int count) + { + return count; + } + } + + return 0; + } + + private static string[] ExtractDependsOn(TestMethodMetadata testMethod) + { + var dependencies = new List(); + + // Check method attributes + foreach (var attr in testMethod.MethodAttributes) + { + var attrClass = attr.AttributeClass; + if (attrClass == null) + { + continue; + } + + // Handle DependsOnAttribute and DependsOnAttribute + if (attrClass.Name == "DependsOnAttribute" || + (attrClass.IsGenericType && attrClass.ConstructedFrom?.Name == "DependsOnAttribute")) + { + string? className = null; + string? methodName = null; + + // For generic DependsOnAttribute, get the type argument + if (attrClass.IsGenericType && attrClass.TypeArguments.Length > 0) + { + className = attrClass.TypeArguments[0].Name; + } + + // Check constructor arguments for class type and method name + for (int i = 0; i < attr.ConstructorArguments.Length; i++) + { + var arg = attr.ConstructorArguments[i]; + // Skip array arguments (like parameterTypes) + if (arg.Kind == TypedConstantKind.Array) + { + continue; + } + if (arg.Value is INamedTypeSymbol typeSymbol) + { + className = typeSymbol.Name; + } + else if (arg.Value is string strValue) + { + methodName = strValue; + } + } + + // Format: "ClassName:MethodName", ":MethodName" for same-class, "ClassName:" for all in class + var dependency = $"{className ?? ""}:{methodName ?? ""}"; + if (dependency != ":") + { + dependencies.Add(dependency); + } + } + } + + // Check class attributes (class-level DependsOn) + foreach (var attr in testMethod.TypeSymbol.GetAttributes()) + { + var attrClass = attr.AttributeClass; + if (attrClass == null) + { + continue; + } + + if (attrClass.Name == "DependsOnAttribute" || + (attrClass.IsGenericType && attrClass.ConstructedFrom?.Name == "DependsOnAttribute")) + { + string? className = null; + string? methodName = null; + + if (attrClass.IsGenericType && attrClass.TypeArguments.Length > 0) + { + className = attrClass.TypeArguments[0].Name; + } + + for (int i = 0; i < attr.ConstructorArguments.Length; i++) + { + var arg = attr.ConstructorArguments[i]; + // Skip array arguments (like parameterTypes) + if (arg.Kind == TypedConstantKind.Array) + { + continue; + } + if (arg.Value is INamedTypeSymbol typeSymbol) + { + className = typeSymbol.Name; + } + else if (arg.Value is string strValue) + { + methodName = strValue; + } + } + + var dependency = $"{className ?? ""}:{methodName ?? ""}"; + if (dependency != ":") + { + dependencies.Add(dependency); + } + } + } + + return dependencies.Distinct().ToArray(); + } + + private static string EscapeString(string value) + { + return value + .Replace("\\", "\\\\") + .Replace("\"", "\\\"") + .Replace("\n", "\\n") + .Replace("\r", "\\r") + .Replace("\t", "\\t"); + } + private static void GenerateModuleInitializer(CodeWriter writer, TestMethodMetadata testMethod, string uniqueClassName) { writer.AppendLine(); diff --git a/TUnit.Core/Interfaces/SourceGenerator/ITestDescriptorSource.cs b/TUnit.Core/Interfaces/SourceGenerator/ITestDescriptorSource.cs new file mode 100644 index 0000000000..947a495a77 --- /dev/null +++ b/TUnit.Core/Interfaces/SourceGenerator/ITestDescriptorSource.cs @@ -0,0 +1,47 @@ +namespace TUnit.Core.Interfaces.SourceGenerator; + +/// +/// Provides fast enumeration of test descriptors for filtering. +/// +/// +/// +/// This interface enables two-phase test discovery: +/// +/// +/// +/// Fast enumeration: returns lightweight +/// instances without materializing full metadata. +/// +/// +/// Lazy materialization: Only tests that pass filtering have their +/// invoked to create full . +/// +/// +/// +/// Implementing this interface is optional. Classes that only implement +/// will have a default implementation provided that materializes all tests. +/// +/// +public interface ITestDescriptorSource +{ + /// + /// Enumerates test descriptors without materializing full test metadata. + /// + /// + /// An enumerable of lightweight test descriptors that can be used for filtering. + /// Each descriptor contains a delegate + /// that can be invoked to create the full . + /// + /// + /// + /// This method should be fast and allocation-free where possible. + /// The returned descriptors should contain pre-computed filter hints + /// (categories, properties) extracted at compile time. + /// + /// + /// For parameterized tests, a single descriptor represents all data rows. + /// The actual data rows are enumerated when is invoked. + /// + /// + IEnumerable EnumerateTestDescriptors(); +} diff --git a/TUnit.Core/Interfaces/SourceGenerator/ITestSource.cs b/TUnit.Core/Interfaces/SourceGenerator/ITestSource.cs index 19ae59b905..0c9f673c4a 100644 --- a/TUnit.Core/Interfaces/SourceGenerator/ITestSource.cs +++ b/TUnit.Core/Interfaces/SourceGenerator/ITestSource.cs @@ -1,6 +1,29 @@ namespace TUnit.Core.Interfaces.SourceGenerator; +/// +/// Provides test metadata for test discovery and execution. +/// +/// +/// +/// For optimized test discovery, implementations can also implement +/// to enable two-phase discovery: +/// +/// +/// Fast enumeration via +/// Lazy materialization via +/// +/// +/// If is not implemented, the discovery pipeline +/// falls back to for all tests. +/// +/// public interface ITestSource { + /// + /// Gets all test metadata for this test source. + /// + /// The test session identifier. + /// Cancellation token. + /// An async enumerable of test metadata. IAsyncEnumerable GetTestsAsync(string testSessionId, CancellationToken cancellationToken = default); } diff --git a/TUnit.Core/TestDescriptor.cs b/TUnit.Core/TestDescriptor.cs new file mode 100644 index 0000000000..e01a1b4e83 --- /dev/null +++ b/TUnit.Core/TestDescriptor.cs @@ -0,0 +1,154 @@ +namespace TUnit.Core; + +/// +/// Lightweight test descriptor for fast enumeration and filtering. +/// Contains only the minimal information needed to identify and filter tests +/// without materializing full test metadata. +/// +/// +/// +/// This struct is designed to minimize allocations during test discovery. +/// The full is only created when +/// is invoked, which happens only for tests that pass filtering. +/// +/// +/// Filter hints (Categories, Properties) are pre-computed at compile time +/// by the source generator, avoiding runtime attribute instantiation. +/// +/// +public readonly struct TestDescriptor +{ + /// + /// Gets the unique identifier for this test. + /// Format: "{Namespace}.{ClassName}.{MethodName}:{DataIndex}" + /// + public required string TestId { get; init; } + + /// + /// Gets the simple name of the test class. + /// + public required string ClassName { get; init; } + + /// + /// Gets the name of the test method. + /// + public required string MethodName { get; init; } + + /// + /// Gets the fully qualified name of the test. + /// Format: "{Namespace}.{ClassName}.{MethodName}" + /// + public required string FullyQualifiedName { get; init; } + + /// + /// Gets the source file path where the test is defined. + /// + public required string FilePath { get; init; } + + /// + /// Gets the line number where the test is defined. + /// + public required int LineNumber { get; init; } + + /// + /// Gets the pre-extracted category values from CategoryAttribute. + /// Pre-computed at compile time to avoid runtime attribute instantiation. + /// + public string[] Categories { get; init; } + + /// + /// Gets the pre-extracted property values from PropertyAttribute. + /// Format: "key=value" pairs. + /// Pre-computed at compile time to avoid runtime attribute instantiation. + /// + public string[] Properties { get; init; } + + /// + /// Gets whether this test has data sources (is parameterized). + /// When true, materialization may yield multiple TestMetadata instances. + /// + public bool HasDataSource { get; init; } + + /// + /// Gets the repeat count from RepeatAttribute, or 0 if not present. + /// Pre-extracted to avoid attribute instantiation. + /// + public int RepeatCount { get; init; } + + /// + /// Gets the dependencies for this test (from DependsOnAttribute). + /// Pre-extracted at compile time to enable dependency expansion during filtering. + /// Format: "ClassName:MethodName" for cross-class, ":MethodName" for same-class, + /// "ClassName:" for all tests in class. + /// + public string[] DependsOn { get; init; } + + /// + /// Gets the factory delegate that creates the full TestMetadata. + /// Only invoked for tests that pass filtering. + /// + /// + /// The delegate accepts a test session ID and cancellation token, returning an async enumerable + /// of TestMetadata. For non-parameterized tests, this yields a single item. + /// For parameterized tests, this yields one item per data row. + /// + public required Func> Materializer { get; init; } + + /// + /// Initializes a new instance of the struct. + /// + public TestDescriptor() + { + Categories = []; + Properties = []; + DependsOn = []; + } + + /// + /// Checks if this test matches the specified category. + /// + /// The category to match. + /// True if the test has the specified category. + public bool HasCategory(string category) + { + var categories = Categories; + for (var i = 0; i < categories.Length; i++) + { + if (string.Equals(categories[i], category, StringComparison.OrdinalIgnoreCase)) + { + return true; + } + } + return false; + } + + /// + /// Checks if this test has the specified property. + /// + /// The property key. + /// The property value (optional, if null only key is checked). + /// True if the test has the specified property. + public bool HasProperty(string key, string? value = null) + { + var prefix = value == null ? $"{key}=" : $"{key}={value}"; + var properties = Properties; + for (var i = 0; i < properties.Length; i++) + { + if (value == null) + { + if (properties[i].StartsWith(prefix, StringComparison.OrdinalIgnoreCase)) + { + return true; + } + } + else + { + if (string.Equals(properties[i], prefix, StringComparison.OrdinalIgnoreCase)) + { + return true; + } + } + } + return false; + } +} diff --git a/TUnit.Engine/Building/Collectors/AotTestDataCollector.cs b/TUnit.Engine/Building/Collectors/AotTestDataCollector.cs index 827bdfb923..ecccccc7e8 100644 --- a/TUnit.Engine/Building/Collectors/AotTestDataCollector.cs +++ b/TUnit.Engine/Building/Collectors/AotTestDataCollector.cs @@ -1,4 +1,4 @@ -using System.Collections.Concurrent; +using System.Collections.Concurrent; using System.Diagnostics.CodeAnalysis; using System.Linq.Expressions; using System.Reflection; @@ -52,8 +52,161 @@ public async Task> CollectTestsAsync(string testSessio var testSourcesList = testSourcesByType.SelectMany(kvp => kvp.Value).ToList(); - // Use sequential processing for small test source sets to avoid task scheduling overhead + // Try two-phase discovery for sources that support it (with specific filter hints) + // This avoids creating full TestMetadata for tests that won't pass filtering IEnumerable standardTestMetadatas; + + if (filterHints.HasHints && testSourcesList.All(static s => s is ITestDescriptorSource)) + { + // Two-phase discovery: enumerate descriptors, filter, then materialize only matching + standardTestMetadatas = await CollectTestsWithTwoPhaseDiscoveryAsync( + testSourcesList.Cast(), + testSessionId, + filterHints).ConfigureAwait(false); + } + else + { + // Fallback: Use traditional collection (for legacy sources or no filter hints) + standardTestMetadatas = await CollectTestsTraditionalAsync(testSourcesList, testSessionId).ConfigureAwait(false); + } + + // Dynamic tests are typically rare, collect sequentially + var dynamicTestMetadatas = new List(); + await foreach (var metadata in CollectDynamicTestsStreaming(testSessionId)) + { + dynamicTestMetadatas.Add(metadata); + } + + return [..standardTestMetadatas, ..dynamicTestMetadatas]; + } + + /// + /// Two-phase discovery: enumerate lightweight descriptors, apply filter hints, materialize only matching. + /// This is more efficient when filters are present as it avoids creating full TestMetadata for non-matching tests. + /// + private async Task> CollectTestsWithTwoPhaseDiscoveryAsync( + IEnumerable descriptorSources, + string testSessionId, + FilterHints filterHints) + { + // Phase 1: Single-pass enumeration with filtering + // - Index all descriptors for dependency resolution + // - Immediately identify matching descriptors (no separate iteration) + // - Track if any matching descriptor has dependencies + var descriptorsByClassAndMethod = new Dictionary<(string ClassName, string MethodName), TestDescriptor>(); + var descriptorsByClass = new Dictionary>(); + var matchingDescriptors = new List(); + var hasDependencies = false; + + foreach (var source in descriptorSources) + { + foreach (var descriptor in source.EnumerateTestDescriptors()) + { + // Index by class + method for specific dependency lookups + var key = (descriptor.ClassName, descriptor.MethodName); + descriptorsByClassAndMethod[key] = descriptor; + + // Index by class for class-level dependency lookups + if (!descriptorsByClass.TryGetValue(descriptor.ClassName, out var classDescriptors)) + { + classDescriptors = []; + descriptorsByClass[descriptor.ClassName] = classDescriptors; + } + classDescriptors.Add(descriptor); + + // Filter during enumeration - no separate pass needed + if (filterHints.CouldDescriptorMatch(descriptor)) + { + matchingDescriptors.Add(descriptor); + if (descriptor.DependsOn.Length > 0) + { + hasDependencies = true; + } + } + } + } + + // Phase 2: Expand dependencies only if any matching descriptor has them + HashSet? expandedSet = null; + if (hasDependencies) + { + expandedSet = new HashSet(matchingDescriptors); + var queue = new Queue(matchingDescriptors); + + while (queue.Count > 0) + { + var current = queue.Dequeue(); + var dependsOn = current.DependsOn; + + for (var i = 0; i < dependsOn.Length; i++) + { + var dependency = dependsOn[i]; + + // Parse dependency format: "ClassName:MethodName" + var separatorIndex = dependency.IndexOf(':'); + if (separatorIndex < 0) + { + continue; + } + + var depClassName = separatorIndex == 0 + ? current.ClassName // Same-class dependency + : dependency.Substring(0, separatorIndex); + var depMethodName = dependency.Substring(separatorIndex + 1); + + if (depMethodName.Length > 0) + { + // Specific method dependency + if (descriptorsByClassAndMethod.TryGetValue((depClassName, depMethodName), out var depDescriptor)) + { + if (expandedSet.Add(depDescriptor)) + { + queue.Enqueue(depDescriptor); + } + } + } + else + { + // Class-level dependency: all tests in class + if (descriptorsByClass.TryGetValue(depClassName, out var classDescriptors)) + { + foreach (var depDescriptor in classDescriptors) + { + if (expandedSet.Add(depDescriptor)) + { + queue.Enqueue(depDescriptor); + } + } + } + } + } + } + } + + // Phase 3: Materialize matching descriptors (including dependencies) + var descriptorsToMaterialize = expandedSet ?? (IEnumerable)matchingDescriptors; + var results = new List(); + + foreach (var descriptor in descriptorsToMaterialize) + { + await foreach (var metadata in descriptor.Materializer(testSessionId, CancellationToken.None).ConfigureAwait(false)) + { + results.Add(metadata); + } + } + + return results; + } + + /// + /// Traditional collection: materialize all tests from sources. + /// Used when filter hints are not available or sources don't support ITestDescriptorSource. + /// + private async Task> CollectTestsTraditionalAsync( + List testSourcesList, + string testSessionId) + { + // Use sequential processing for small test source sets to avoid task scheduling overhead if (testSourcesList.Count < Building.ParallelThresholds.MinItemsForParallel) { var results = new List(); @@ -64,23 +217,14 @@ public async Task> CollectTestsAsync(string testSessio results.Add(metadata); } } - standardTestMetadatas = results; + return results; } else { - standardTestMetadatas = await testSourcesList + return await testSourcesList .SelectManyAsync(testSource => testSource.GetTestsAsync(testSessionId)) .ProcessInParallel(); } - - // Dynamic tests are typically rare, collect sequentially - var dynamicTestMetadatas = new List(); - await foreach (var metadata in CollectDynamicTestsStreaming(testSessionId)) - { - dynamicTestMetadatas.Add(metadata); - } - - return [..standardTestMetadatas, ..dynamicTestMetadatas]; } [RequiresUnreferencedCode("Dynamic test collection requires expression compilation and reflection")] @@ -373,4 +517,69 @@ public override Func + /// Enumerates lightweight test descriptors for fast filtering. + /// For sources implementing ITestDescriptorSource, returns pre-computed descriptors. + /// For legacy sources, creates descriptors with default filter hints. + /// + public IEnumerable EnumerateDescriptors() + { + // Enumerate descriptors from all test sources + foreach (var kvp in Sources.TestSources) + { + foreach (var testSource in kvp.Value) + { + // Check if the source implements ITestDescriptorSource for optimized enumeration + if (testSource is ITestDescriptorSource descriptorSource) + { + foreach (var descriptor in descriptorSource.EnumerateTestDescriptors()) + { + yield return descriptor; + } + } + // For legacy sources without ITestDescriptorSource, we can't enumerate descriptors + // without materializing - these will need to use the fallback path + } + } + } + + /// + /// Materializes full test metadata from filtered descriptors. + /// Only called for tests that passed filtering, avoiding unnecessary materialization. + /// + public async IAsyncEnumerable MaterializeFromDescriptorsAsync( + IEnumerable descriptors, + string testSessionId, + [EnumeratorCancellation] CancellationToken cancellationToken = default) + { + foreach (var descriptor in descriptors) + { + cancellationToken.ThrowIfCancellationRequested(); + + // Use the materializer delegate to create full TestMetadata + await foreach (var metadata in descriptor.Materializer(testSessionId, cancellationToken).ConfigureAwait(false)) + { + yield return metadata; + } + } + } + + /// + /// Gets test sources that don't implement ITestDescriptorSource. + /// These sources require full materialization for discovery. + /// + public IEnumerable GetLegacyTestSources() + { + foreach (var kvp in Sources.TestSources) + { + foreach (var testSource in kvp.Value) + { + if (testSource is not ITestDescriptorSource) + { + yield return testSource; + } + } + } + } } diff --git a/TUnit.Engine/Building/Interfaces/ITestDataCollector.cs b/TUnit.Engine/Building/Interfaces/ITestDataCollector.cs index c698e5b7ee..87a856303b 100644 --- a/TUnit.Engine/Building/Interfaces/ITestDataCollector.cs +++ b/TUnit.Engine/Building/Interfaces/ITestDataCollector.cs @@ -23,4 +23,24 @@ internal interface ITestDataCollector /// Optional execution filter for pre-filtering test sources /// Collection of test metadata ready for processing Task> CollectTestsAsync(string testSessionId, ITestExecutionFilter? filter); + + /// + /// Enumerates lightweight test descriptors for fast filtering. + /// This is the first phase of two-phase discovery, allowing filtering without full materialization. + /// + /// Collection of test descriptors that can be filtered before materialization. + IEnumerable EnumerateDescriptors(); + + /// + /// Materializes full test metadata from filtered descriptors. + /// This is the second phase of two-phase discovery, only called for tests that passed filtering. + /// + /// Descriptors that passed filtering. + /// The test session identifier. + /// Cancellation token. + /// Collection of fully materialized test metadata. + IAsyncEnumerable MaterializeFromDescriptorsAsync( + IEnumerable descriptors, + string testSessionId, + CancellationToken cancellationToken = default); } diff --git a/TUnit.Engine/Discovery/ReflectionTestDataCollector.cs b/TUnit.Engine/Discovery/ReflectionTestDataCollector.cs index 313db1337b..740f653d48 100644 --- a/TUnit.Engine/Discovery/ReflectionTestDataCollector.cs +++ b/TUnit.Engine/Discovery/ReflectionTestDataCollector.cs @@ -2100,4 +2100,165 @@ private static TestMetadata CreateFailedTestMetadataForDynamicTest(DynamicDiscov }; } + /// + /// Enumerates lightweight test descriptors for fast filtering. + /// In reflection mode, this scans assemblies to create descriptors without full materialization. + /// Note: Reflection mode is less optimized than source-gen mode since we can't pre-compute filter hints. + /// + public IEnumerable EnumerateDescriptors() + { + // In reflection mode, we don't have pre-computed descriptors like source-gen mode. + // We enumerate types and methods to create descriptors, but can't extract + // filter hints (categories, properties) without instantiating attributes. + // This provides the structure for two-phase discovery but with limited optimization. + + var allAssemblies = Assemblies; + foreach (var assembly in allAssemblies) + { + if (!ShouldScanAssembly(assembly)) + { + continue; + } + + var types = _assemblyTypesCache.GetOrAdd(assembly, asm => + { + try + { + return asm.GetTypes(); + } + catch (ReflectionTypeLoadException rtle) + { + return rtle.Types.Where(static x => x != null).ToArray()!; + } + catch + { + return []; + } + }); + + foreach (var type in types) + { + if (!type.IsClass || type.IsAbstract || IsCompilerGenerated(type)) + { + continue; + } + + // Skip generic type definitions for now - they're handled separately + if (type.IsGenericTypeDefinition) + { + continue; + } + + MethodInfo[] testMethods; + try + { + var inheritsTests = type.IsDefined(typeof(InheritsTestsAttribute), inherit: false); + if (inheritsTests) + { + var allMethods = GetAllTestMethods(type); + var testMethodsList = new List(); + foreach (var method in allMethods) + { + if (method.IsDefined(typeof(TestAttribute), inherit: false) && !method.IsAbstract) + { + testMethodsList.Add(method); + } + } + testMethods = testMethodsList.ToArray(); + } + else + { + var declaredMethods = type.GetMethods(BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly); + var testMethodsList = new List(declaredMethods.Length); + foreach (var method in declaredMethods) + { + if (method.IsDefined(typeof(TestAttribute), inherit: false) && !method.IsAbstract) + { + testMethodsList.Add(method); + } + } + testMethods = testMethodsList.ToArray(); + } + } + catch + { + continue; + } + + foreach (var method in testMethods) + { + // Create a descriptor for each test method + // In reflection mode, we can't pre-extract filter hints without instantiating attributes + var capturedType = type; + var capturedMethod = method; + + yield return new TestDescriptor + { + TestId = $"{type.FullName}.{method.Name}", + ClassName = type.Name, + MethodName = method.Name, + FullyQualifiedName = $"{type.FullName}.{method.Name}", + FilePath = ExtractFilePath(method) ?? "Unknown", + LineNumber = ExtractLineNumber(method) ?? 0, + Categories = [], // Can't extract without attribute instantiation + Properties = [], // Can't extract without attribute instantiation + HasDataSource = method.IsDefined(typeof(IDataSourceAttribute), inherit: false) || + type.IsDefined(typeof(IDataSourceAttribute), inherit: false), + RepeatCount = 0, // Can't extract without attribute instantiation + Materializer = CreateReflectionMaterializer(capturedType, capturedMethod) + }; + } + } + } + } + + private static Func> CreateReflectionMaterializer( + [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors | DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] + Type type, + MethodInfo method) + { + return (testSessionId, cancellationToken) => MaterializeSingleTestAsync(type, method, cancellationToken); + } + + private static async IAsyncEnumerable MaterializeSingleTestAsync( + [DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors | DynamicallyAccessedMemberTypes.PublicMethods | DynamicallyAccessedMemberTypes.NonPublicMethods)] + Type type, + MethodInfo method, + [EnumeratorCancellation] CancellationToken cancellationToken = default) + { + cancellationToken.ThrowIfCancellationRequested(); + + TestMetadata metadata; + try + { + metadata = await BuildTestMetadata(type, method).ConfigureAwait(false); + } + catch (Exception ex) + { + metadata = CreateFailedTestMetadata(type, method, ex); + } + + yield return metadata; + } + + /// + /// Materializes full test metadata from filtered descriptors. + /// Only called for tests that passed filtering. + /// + public async IAsyncEnumerable MaterializeFromDescriptorsAsync( + IEnumerable descriptors, + string testSessionId, + [EnumeratorCancellation] CancellationToken cancellationToken = default) + { + foreach (var descriptor in descriptors) + { + cancellationToken.ThrowIfCancellationRequested(); + + await foreach (var metadata in descriptor.Materializer(testSessionId, cancellationToken).ConfigureAwait(false)) + { + yield return metadata; + } + } + } + } diff --git a/TUnit.Engine/Services/MetadataFilterMatcher.cs b/TUnit.Engine/Services/MetadataFilterMatcher.cs index 64d1d9157f..3dfbf4d7d8 100644 --- a/TUnit.Engine/Services/MetadataFilterMatcher.cs +++ b/TUnit.Engine/Services/MetadataFilterMatcher.cs @@ -73,6 +73,44 @@ public bool CouldTypeMatch(Type type) return true; } + + /// + /// Check if a test descriptor could match this filter based on the hints. + /// Uses pre-computed filter hints in the descriptor for fast matching. + /// Returns true if no hints or if the descriptor matches all available hints. + /// + /// + /// This method can filter by both ClassName and MethodName because dependency + /// expansion at the descriptor level ensures that dependencies are included + /// before this filter is applied. The DependsOn property on TestDescriptor + /// contains pre-computed dependency information from DependsOnAttribute. + /// + public bool CouldDescriptorMatch(TestDescriptor descriptor) + { + // Check class name hint + if (ClassName != null) + { + // Handle generic types (e.g., MyClass`1) + if (descriptor.ClassName != ClassName && !descriptor.ClassName.StartsWith(ClassName + "`")) + { + return false; + } + } + + // Check method name hint + if (MethodName != null) + { + if (descriptor.MethodName != MethodName) + { + return false; + } + } + + // Note: We don't check assembly/namespace here because descriptors don't store that info + // The type-level filtering in CouldTypeMatch handles those hints during source enumeration + + return true; + } } /// 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 95a071ab82..e9f46064a1 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 @@ -1400,6 +1400,24 @@ namespace public static .TestDependency FromClassAndMethod( classType, string methodName, bool proceedOnFailure = false) { } public static .TestDependency FromMethodName(string methodName, bool proceedOnFailure = false) { } } + public readonly struct TestDescriptor + { + public TestDescriptor() { } + public string[] Categories { get; init; } + public required string ClassName { get; init; } + public string[] DependsOn { get; init; } + public required string FilePath { get; init; } + public required string FullyQualifiedName { get; init; } + public bool HasDataSource { get; init; } + public required int LineNumber { get; init; } + public required > Materializer { get; init; } + public required string MethodName { get; init; } + public string[] Properties { get; init; } + public int RepeatCount { get; init; } + public required string TestId { get; init; } + public bool HasCategory(string category) { } + public bool HasProperty(string key, string? value = null) { } + } public class TestDetails : ., ., ., ., ., . { public TestDetails() { } @@ -2560,6 +2578,10 @@ namespace . Type { get; } .<..PropertyInjectionMetadata> GetPropertyMetadata(); } + public interface ITestDescriptorSource + { + .<.TestDescriptor> EnumerateTestDescriptors(); + } public interface ITestSource { .<.TestMetadata> GetTestsAsync(string testSessionId, .CancellationToken cancellationToken = default); 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 09b288a075..8cc53af1a3 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 @@ -1400,6 +1400,24 @@ namespace public static .TestDependency FromClassAndMethod( classType, string methodName, bool proceedOnFailure = false) { } public static .TestDependency FromMethodName(string methodName, bool proceedOnFailure = false) { } } + public readonly struct TestDescriptor + { + public TestDescriptor() { } + public string[] Categories { get; init; } + public required string ClassName { get; init; } + public string[] DependsOn { get; init; } + public required string FilePath { get; init; } + public required string FullyQualifiedName { get; init; } + public bool HasDataSource { get; init; } + public required int LineNumber { get; init; } + public required > Materializer { get; init; } + public required string MethodName { get; init; } + public string[] Properties { get; init; } + public int RepeatCount { get; init; } + public required string TestId { get; init; } + public bool HasCategory(string category) { } + public bool HasProperty(string key, string? value = null) { } + } public class TestDetails : ., ., ., ., ., . { public TestDetails() { } @@ -2560,6 +2578,10 @@ namespace . Type { get; } .<..PropertyInjectionMetadata> GetPropertyMetadata(); } + public interface ITestDescriptorSource + { + .<.TestDescriptor> EnumerateTestDescriptors(); + } public interface ITestSource { .<.TestMetadata> GetTestsAsync(string testSessionId, .CancellationToken cancellationToken = default); 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 3b45e76512..ab0af14524 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 @@ -1400,6 +1400,24 @@ namespace public static .TestDependency FromClassAndMethod( classType, string methodName, bool proceedOnFailure = false) { } public static .TestDependency FromMethodName(string methodName, bool proceedOnFailure = false) { } } + public readonly struct TestDescriptor + { + public TestDescriptor() { } + public string[] Categories { get; init; } + public required string ClassName { get; init; } + public string[] DependsOn { get; init; } + public required string FilePath { get; init; } + public required string FullyQualifiedName { get; init; } + public bool HasDataSource { get; init; } + public required int LineNumber { get; init; } + public required > Materializer { get; init; } + public required string MethodName { get; init; } + public string[] Properties { get; init; } + public int RepeatCount { get; init; } + public required string TestId { get; init; } + public bool HasCategory(string category) { } + public bool HasProperty(string key, string? value = null) { } + } public class TestDetails : ., ., ., ., ., . { public TestDetails() { } @@ -2560,6 +2578,10 @@ namespace . Type { get; } .<..PropertyInjectionMetadata> GetPropertyMetadata(); } + public interface ITestDescriptorSource + { + .<.TestDescriptor> EnumerateTestDescriptors(); + } public interface ITestSource { .<.TestMetadata> GetTestsAsync(string testSessionId, .CancellationToken cancellationToken = default); diff --git a/docs/plans/2026-01-11-lazy-test-materialization-design.md b/docs/plans/2026-01-11-lazy-test-materialization-design.md new file mode 100644 index 0000000000..715c972b94 --- /dev/null +++ b/docs/plans/2026-01-11-lazy-test-materialization-design.md @@ -0,0 +1,362 @@ +# Lazy Test Materialization Design + +## Problem Statement + +TUnit's test discovery is ~9% slower than MSTest for single/few test scenarios. Profiling reveals the bottleneck is **eager materialization**: every test creates a full `TestMetadata` object during discovery, even tests that won't run due to filtering. + +Current pipeline: +``` +Source Gen → Full TestMetadata (20+ properties, delegates) → Filter → Build → Execute + ↑ EXPENSIVE ↑ Most tests discarded +``` + +Proposed pipeline: +``` +Source Gen → Lightweight Descriptor → Filter → Lazy Materialize → Build → Execute + ↑ CHEAP ↑ Only matching tests +``` + +## Current Architecture + +### TestMetadata (Heavyweight) + +```csharp +public abstract class TestMetadata +{ + // Identity (needed for filtering) + public required string TestName { get; init; } + public required Type TestClassType { get; init; } + public required string TestMethodName { get; init; } + + // Location (needed for display) + public required string FilePath { get; init; } + public required int LineNumber { get; init; } + + // Expensive (delegates, reflection, allocations) + public Func InstanceFactory { get; init; } + public Func? TestInvoker { get; init; } + public required Func AttributeFactory { get; init; } + public required IDataSourceAttribute[] DataSources { get; init; } + public required IDataSourceAttribute[] ClassDataSources { get; init; } + public required PropertyDataSource[] PropertyDataSources { get; init; } + public required MethodMetadata MethodMetadata { get; init; } + // ... 15+ more properties +} +``` + +**Problem**: All 20+ properties are populated during discovery, including: +- Delegates that capture closures (allocations) +- Arrays that are never used if test doesn't match filter +- Attribute factories that instantiate attributes + +### ITestSource Interface + +```csharp +public interface ITestSource +{ + IAsyncEnumerable GetTestsAsync(string testSessionId, CancellationToken ct); +} +``` + +**Problem**: Returns full `TestMetadata`, forcing eager materialization. + +## Proposed Architecture + +### Phase 1: Lightweight TestDescriptor + +```csharp +/// +/// Minimal test identity for fast enumeration and filtering. +/// No allocations beyond the struct itself. +/// +public readonly struct TestDescriptor +{ + // Identity (for filtering) - all value types or interned strings + public required string TestId { get; init; } + public required string ClassName { get; init; } + public required string MethodName { get; init; } + public required string FullyQualifiedName { get; init; } + + // Location (for display) + public required string FilePath { get; init; } + public required int LineNumber { get; init; } + + // Filter hints (pre-computed during source gen) + public required string[] Categories { get; init; } // [Category("X")] values + public required string[] Traits { get; init; } // Trait key=value pairs + public required bool HasDataSource { get; init; } // Quick check for parameterized + public required int RepeatCount { get; init; } // Pre-extracted + + // Lazy materialization + public required Func Materializer { get; init; } +} +``` + +**Key properties**: +- Struct (stack allocated) +- Only filter-relevant data +- Pre-computed filter hints (source gen does the work) +- Single `Materializer` delegate defers expensive work + +### Phase 2: Two-Phase Interface + +```csharp +/// +/// Fast test enumeration for filtering. +/// +public interface ITestDescriptorSource +{ + IEnumerable EnumerateTests(); +} + +/// +/// Full test source (backward compatible). +/// +public interface ITestSource : ITestDescriptorSource +{ + IAsyncEnumerable GetTestsAsync(string testSessionId, CancellationToken ct); +} +``` + +### Phase 3: Source Generator Changes + +Current generated code (simplified): +```csharp +public class MyTestClass_Tests : ITestSource +{ + public async IAsyncEnumerable GetTestsAsync(string sessionId, ...) + { + yield return new SourceGeneratedTestMetadata + { + TestName = "MyTest", + TestClassType = typeof(MyTestClass), + InstanceFactory = (types, args) => new MyTestClass(), + TestInvoker = (instance, args) => ((MyTestClass)instance).MyTest(), + AttributeFactory = () => new[] { new TestAttribute() }, + DataSources = new[] { ... }, + // ... 15+ more expensive properties + }; + } +} +``` + +Proposed generated code: +```csharp +public class MyTestClass_Tests : ITestSource +{ + // Pre-computed at compile time (static readonly) + private static readonly TestDescriptor _descriptor = new() + { + TestId = "MyTestClass.MyTest", + ClassName = "MyTestClass", + MethodName = "MyTest", + FullyQualifiedName = "MyNamespace.MyTestClass.MyTest", + FilePath = "MyTestClass.cs", + LineNumber = 42, + Categories = new[] { "Unit" }, // Pre-extracted + Traits = Array.Empty(), + HasDataSource = false, + RepeatCount = 0, + Materializer = MaterializeTest + }; + + // Fast path: Just return pre-computed descriptor + public IEnumerable EnumerateTests() + { + yield return _descriptor; + } + + // Slow path: Full materialization (only called for matching tests) + private static TestMetadata MaterializeTest(string sessionId) + { + return new SourceGeneratedTestMetadata + { + // ... full properties + }; + } + + // Backward compatible + public async IAsyncEnumerable GetTestsAsync(string sessionId, ...) + { + yield return MaterializeTest(sessionId); + } +} +``` + +### Phase 4: Pipeline Changes + +```csharp +internal sealed class TestBuilderPipeline +{ + public async Task> BuildTestsAsync( + string testSessionId, + ITestExecutionFilter? filter = null) + { + // Phase 1: Fast enumeration + var descriptors = _dataCollector.EnumerateDescriptors(); + + // Phase 2: Filter (no materialization yet) + var matchingDescriptors = filter != null + ? descriptors.Where(d => FilterMatches(d, filter)) + : descriptors; + + // Phase 3: Lazy materialization (only matching tests) + var metadata = matchingDescriptors + .Select(d => d.Materializer(testSessionId)); + + // Phase 4: Build executable tests + return await BuildTestsFromMetadataAsync(metadata); + } + + private static bool FilterMatches(TestDescriptor d, ITestExecutionFilter filter) + { + // Fast filter check using pre-computed hints + // No attribute instantiation, no reflection + return filter.Matches(d.FullyQualifiedName, d.Categories, d.Traits); + } +} +``` + +## Data Source Deferral (Advanced) + +For parameterized tests, data sources can be deferred even further: + +```csharp +public readonly struct TestDescriptor +{ + // For parameterized tests, descriptor represents the "template" + // Each data row becomes a separate test during materialization + public required bool HasDataSource { get; init; } + public required int EstimatedDataRowCount { get; init; } // Hint for capacity +} +``` + +During materialization: +```csharp +private static IEnumerable MaterializeTest(string sessionId) +{ + // Data source evaluation happens here, after filtering + foreach (var dataRow in GetDataSource()) + { + yield return new SourceGeneratedTestMetadata + { + // ... properties with dataRow values + }; + } +} +``` + +## Implementation Plan + +### Step 1: Add TestDescriptor (Non-Breaking) + +1. Create `TUnit.Core/TestDescriptor.cs` +2. Create `TUnit.Core/Interfaces/SourceGenerator/ITestDescriptorSource.cs` +3. Make `ITestSource` extend `ITestDescriptorSource` with default implementation +4. Add unit tests + +**Estimated scope**: 2 new files, 0 breaking changes + +### Step 2: Update Source Generator + +1. Modify `TestMetadataGenerator.cs` to generate: + - Static `TestDescriptor` field with pre-computed values + - `EnumerateTests()` method returning descriptors + - `MaterializeTest()` factory method +2. Extract filter hints at compile time (categories, traits) +3. Update snapshot tests + +**Estimated scope**: ~300 lines changed in source generator + +### Step 3: Update Pipeline + +1. Add `ITestDataCollector.EnumerateDescriptors()` method +2. Update `TestBuilderPipeline` to use two-phase approach +3. Implement fast filter matching against descriptors +4. Add fallback to full materialization for complex filters + +**Estimated scope**: ~150 lines in pipeline + +### Step 4: Optimize Reflection Mode + +1. Update `ReflectionTestDataCollector` to support descriptors +2. Cache descriptor data per-type (not per-test) +3. Implement lazy materialization for reflection mode + +**Estimated scope**: ~200 lines + +### Step 5: Benchmarks and Validation + +1. Run speed-comparison benchmarks +2. Target: Match or beat MSTest for single test execution +3. Validate AOT compatibility +4. Run full test suite + +## Performance Expectations + +| Scenario | Current | Expected | Improvement | +|----------|---------|----------|-------------| +| Single test (no filter) | 596ms | ~530ms | ~11% | +| Single test (with filter) | 596ms | ~480ms | ~20% | +| 1000 tests, run 10 | N/A | -30% time | Significant | +| Full suite | baseline | ~same | No regression | + +Key wins: +1. **No delegate allocation** during enumeration (major GC improvement) +2. **No attribute instantiation** until materialization +3. **Pre-computed filter hints** avoid runtime reflection +4. **Only materialize tests that will run** + +## Risks and Mitigations + +### Risk: Breaking change for custom test sources + +**Mitigation**: `ITestDescriptorSource` has default implementation that delegates to `GetTestsAsync()`. Existing sources continue to work, just without optimization. + +### Risk: Source generator complexity + +**Mitigation**: Implement incrementally. Phase 1 just adds descriptor alongside existing code. Only remove old code after validation. + +### Risk: Filter hint extraction misses edge cases + +**Mitigation**: Complex filters fall back to full materialization. Fast path is optimization, not requirement. + +### Risk: Memory overhead of descriptor + metadata + +**Mitigation**: Descriptor is struct (stack allocated). Materializer delegate is shared (static method). Net memory should decrease. + +## Alternatives Considered + +### Alternative 1: Lazy property initialization + +Instead of separate descriptor, make `TestMetadata` properties lazy. + +**Rejected**: Still allocates the object, still creates delegate captures. Doesn't solve GC pressure. + +### Alternative 2: Compiled filter expressions + +Generate filter-specific code at compile time. + +**Rejected**: Too complex, doesn't handle runtime filters (VS Test Explorer). + +### Alternative 3: Just optimize hot paths + +Continue with micro-optimizations in existing architecture. + +**Rejected**: Diminishing returns. Already applied sequential processing optimization. Fundamental architecture limits further gains. + +## Success Criteria + +1. Single test execution time <= MSTest (currently MSTest ~553ms, TUnit ~540ms after PR #4299) +2. No performance regression for full test suite +3. All existing tests pass +4. AOT/trimming compatibility maintained +5. Backward compatible with custom `ITestSource` implementations + +## Next Steps + +1. Review and approve this design +2. Create feature branch: `feature/lazy-test-materialization` +3. Implement Step 1 (TestDescriptor) +4. Iterate through remaining steps +5. Performance validation at each step