diff --git a/TUnit.Core.SourceGenerator.Tests/AbstractTests.AbstractClass.verified.txt b/TUnit.Core.SourceGenerator.Tests/AbstractTests.AbstractClass.verified.txt
index 5f282702bb..e69de29bb2 100644
--- a/TUnit.Core.SourceGenerator.Tests/AbstractTests.AbstractClass.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/AbstractTests.AbstractClass.verified.txt
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/TUnit.Core.SourceGenerator.Tests/AotConverterGeneratorTests.GeneratesCode.verified.txt b/TUnit.Core.SourceGenerator.Tests/AotConverterGeneratorTests.GeneratesCode.verified.txt
deleted file mode 100644
index 16ab7c3f35..0000000000
--- a/TUnit.Core.SourceGenerator.Tests/AotConverterGeneratorTests.GeneratesCode.verified.txt
+++ /dev/null
@@ -1,1376 +0,0 @@
-//
-#pragma warning disable
-
-#nullable enable
-using System;
-using TUnit.Core.Converters;
-namespace TUnit.Generated;
-internal sealed class AotConverter_0 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.AllDataSourcesCombinedTests.DataSource1);
- public Type TargetType => typeof(int);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is int targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.AllDataSourcesCombinedTests.DataSource1 sourceTypedValue)
- {
- int converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_1 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.AllDataSourcesCombinedTests.DataSource2);
- public Type TargetType => typeof(int);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is int targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.AllDataSourcesCombinedTests.DataSource2 sourceTypedValue)
- {
- int converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_2 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.AllDataSourcesCombinedTests.DataSource3);
- public Type TargetType => typeof(int);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is int targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.AllDataSourcesCombinedTests.DataSource3 sourceTypedValue)
- {
- int converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_3 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.AllDataSourcesCombinedTestsVerification.DataSource1);
- public Type TargetType => typeof(int);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is int targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.AllDataSourcesCombinedTestsVerification.DataSource1 sourceTypedValue)
- {
- int converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_4 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.AllDataSourcesCombinedTestsVerification.DataSource2);
- public Type TargetType => typeof(int);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is int targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.AllDataSourcesCombinedTestsVerification.DataSource2 sourceTypedValue)
- {
- int converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_5 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.AllDataSourcesCombinedTestsVerification.DataSource3);
- public Type TargetType => typeof(int);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is int targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.AllDataSourcesCombinedTestsVerification.DataSource3 sourceTypedValue)
- {
- int converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_6 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.ArgumentsWithClassDataSourceTests.IntDataSource1);
- public Type TargetType => typeof(int);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is int targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.ArgumentsWithClassDataSourceTests.IntDataSource1 sourceTypedValue)
- {
- int converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_7 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.ArgumentsWithClassDataSourceTests.IntDataSource2);
- public Type TargetType => typeof(int);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is int targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.ArgumentsWithClassDataSourceTests.IntDataSource2 sourceTypedValue)
- {
- int converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_8 : IAotConverter
-{
- public Type SourceType => typeof(int);
- public Type TargetType => typeof(global::TUnit.TestProject.ExplicitInteger);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is global::TUnit.TestProject.ExplicitInteger targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is int sourceTypedValue)
- {
- global::TUnit.TestProject.ExplicitInteger converted = (global::TUnit.TestProject.ExplicitInteger)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_9 : IAotConverter
-{
- public Type SourceType => typeof(int);
- public Type TargetType => typeof(global::TUnit.TestProject.ImplicitInteger);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is global::TUnit.TestProject.ImplicitInteger targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is int sourceTypedValue)
- {
- global::TUnit.TestProject.ImplicitInteger converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_10 : IAotConverter
-{
- public Type SourceType => typeof(byte);
- public Type TargetType => typeof(byte?);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is byte targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is byte sourceTypedValue)
- {
- byte? converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_11 : IAotConverter
-{
- public Type SourceType => typeof(byte?);
- public Type TargetType => typeof(byte);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is byte targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is byte sourceTypedValue)
- {
- byte converted = (byte)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_12 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.ClassDataSourceEnumerableTest.EnumerableDataSource);
- public Type TargetType => typeof(string);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is string targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.ClassDataSourceEnumerableTest.EnumerableDataSource sourceTypedValue)
- {
- string converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_13 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.ClassDataSourceWithMethodDataSourceTests.DataSource1);
- public Type TargetType => typeof(int);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is int targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.ClassDataSourceWithMethodDataSourceTests.DataSource1 sourceTypedValue)
- {
- int converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_14 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.ClassDataSourceWithMethodDataSourceTests.DataSource2);
- public Type TargetType => typeof(int);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is int targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.ClassDataSourceWithMethodDataSourceTests.DataSource2 sourceTypedValue)
- {
- int converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_15 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.ClassDataSourceWithMethodDataSourceTests.DataSource3);
- public Type TargetType => typeof(int);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is int targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.ClassDataSourceWithMethodDataSourceTests.DataSource3 sourceTypedValue)
- {
- int converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_16 : IAotConverter
-{
- public Type SourceType => typeof(int);
- public Type TargetType => typeof(int?);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is int targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is int sourceTypedValue)
- {
- int? converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_17 : IAotConverter
-{
- public Type SourceType => typeof(int?);
- public Type TargetType => typeof(int);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is int targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is int sourceTypedValue)
- {
- int converted = (int)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_18 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.ComprehensiveCountTest.ClassData);
- public Type TargetType => typeof(string);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is string targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.ComprehensiveCountTest.ClassData sourceTypedValue)
- {
- string converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_19 : IAotConverter
-{
- public Type SourceType => typeof(bool);
- public Type TargetType => typeof(bool?);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is bool targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is bool sourceTypedValue)
- {
- bool? converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_20 : IAotConverter
-{
- public Type SourceType => typeof(bool?);
- public Type TargetType => typeof(bool);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is bool targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is bool sourceTypedValue)
- {
- bool converted = (bool)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_21 : IAotConverter
-{
- public Type SourceType => typeof(byte);
- public Type TargetType => typeof(decimal);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is decimal targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is byte sourceTypedValue)
- {
- decimal converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_22 : IAotConverter
-{
- public Type SourceType => typeof(sbyte);
- public Type TargetType => typeof(decimal);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is decimal targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is sbyte sourceTypedValue)
- {
- decimal converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_23 : IAotConverter
-{
- public Type SourceType => typeof(short);
- public Type TargetType => typeof(decimal);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is decimal targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is short sourceTypedValue)
- {
- decimal converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_24 : IAotConverter
-{
- public Type SourceType => typeof(ushort);
- public Type TargetType => typeof(decimal);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is decimal targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is ushort sourceTypedValue)
- {
- decimal converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_25 : IAotConverter
-{
- public Type SourceType => typeof(char);
- public Type TargetType => typeof(decimal);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is decimal targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is char sourceTypedValue)
- {
- decimal converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_26 : IAotConverter
-{
- public Type SourceType => typeof(int);
- public Type TargetType => typeof(decimal);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is decimal targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is int sourceTypedValue)
- {
- decimal converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_27 : IAotConverter
-{
- public Type SourceType => typeof(uint);
- public Type TargetType => typeof(decimal);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is decimal targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is uint sourceTypedValue)
- {
- decimal converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_28 : IAotConverter
-{
- public Type SourceType => typeof(long);
- public Type TargetType => typeof(decimal);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is decimal targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is long sourceTypedValue)
- {
- decimal converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_29 : IAotConverter
-{
- public Type SourceType => typeof(ulong);
- public Type TargetType => typeof(decimal);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is decimal targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is ulong sourceTypedValue)
- {
- decimal converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_30 : IAotConverter
-{
- public Type SourceType => typeof(float);
- public Type TargetType => typeof(decimal);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is decimal targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is float sourceTypedValue)
- {
- decimal converted = (decimal)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_31 : IAotConverter
-{
- public Type SourceType => typeof(double);
- public Type TargetType => typeof(decimal);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is decimal targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is double sourceTypedValue)
- {
- decimal converted = (decimal)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_32 : IAotConverter
-{
- public Type SourceType => typeof(decimal);
- public Type TargetType => typeof(byte);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is byte targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is decimal sourceTypedValue)
- {
- byte converted = (byte)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_33 : IAotConverter
-{
- public Type SourceType => typeof(decimal);
- public Type TargetType => typeof(sbyte);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is sbyte targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is decimal sourceTypedValue)
- {
- sbyte converted = (sbyte)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_34 : IAotConverter
-{
- public Type SourceType => typeof(decimal);
- public Type TargetType => typeof(char);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is char targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is decimal sourceTypedValue)
- {
- char converted = (char)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_35 : IAotConverter
-{
- public Type SourceType => typeof(decimal);
- public Type TargetType => typeof(short);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is short targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is decimal sourceTypedValue)
- {
- short converted = (short)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_36 : IAotConverter
-{
- public Type SourceType => typeof(decimal);
- public Type TargetType => typeof(ushort);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is ushort targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is decimal sourceTypedValue)
- {
- ushort converted = (ushort)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_37 : IAotConverter
-{
- public Type SourceType => typeof(decimal);
- public Type TargetType => typeof(int);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is int targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is decimal sourceTypedValue)
- {
- int converted = (int)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_38 : IAotConverter
-{
- public Type SourceType => typeof(decimal);
- public Type TargetType => typeof(uint);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is uint targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is decimal sourceTypedValue)
- {
- uint converted = (uint)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_39 : IAotConverter
-{
- public Type SourceType => typeof(decimal);
- public Type TargetType => typeof(long);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is long targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is decimal sourceTypedValue)
- {
- long converted = (long)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_40 : IAotConverter
-{
- public Type SourceType => typeof(decimal);
- public Type TargetType => typeof(ulong);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is ulong targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is decimal sourceTypedValue)
- {
- ulong converted = (ulong)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_41 : IAotConverter
-{
- public Type SourceType => typeof(decimal);
- public Type TargetType => typeof(float);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is float targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is decimal sourceTypedValue)
- {
- float converted = (float)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_42 : IAotConverter
-{
- public Type SourceType => typeof(decimal);
- public Type TargetType => typeof(double);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is double targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is decimal sourceTypedValue)
- {
- double converted = (double)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_43 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.TestEnum);
- public Type TargetType => typeof(global::TUnit.TestProject.TestEnum?);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is global::TUnit.TestProject.TestEnum targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.TestEnum sourceTypedValue)
- {
- global::TUnit.TestProject.TestEnum? converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_44 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.TestEnum?);
- public Type TargetType => typeof(global::TUnit.TestProject.TestEnum);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is global::TUnit.TestProject.TestEnum targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.TestEnum sourceTypedValue)
- {
- global::TUnit.TestProject.TestEnum converted = (global::TUnit.TestProject.TestEnum)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_45 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.MixedDataSourceBugTest.ClassData1);
- public Type TargetType => typeof(int);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is int targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.MixedDataSourceBugTest.ClassData1 sourceTypedValue)
- {
- int converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_46 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.MixedDataSourceBugTest.ClassData2);
- public Type TargetType => typeof(int);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is int targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.MixedDataSourceBugTest.ClassData2 sourceTypedValue)
- {
- int converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_47 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.MixedMatrixTests.Enum4);
- public Type TargetType => typeof(global::TUnit.TestProject.MixedMatrixTestsUnion1);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is global::TUnit.TestProject.MixedMatrixTestsUnion1 targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.MixedMatrixTests.Enum4 sourceTypedValue)
- {
- global::TUnit.TestProject.MixedMatrixTestsUnion1 converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_48 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.MixedMatrixTestsUnion1);
- public Type TargetType => typeof(global::TUnit.TestProject.MixedMatrixTests.Enum4);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is global::TUnit.TestProject.MixedMatrixTests.Enum4 targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.MixedMatrixTestsUnion1 sourceTypedValue)
- {
- global::TUnit.TestProject.MixedMatrixTests.Enum4 converted = (global::TUnit.TestProject.MixedMatrixTests.Enum4)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_49 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.MixedMatrixTests.Enum5);
- public Type TargetType => typeof(global::TUnit.TestProject.MixedMatrixTestsUnion1);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is global::TUnit.TestProject.MixedMatrixTestsUnion1 targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.MixedMatrixTests.Enum5 sourceTypedValue)
- {
- global::TUnit.TestProject.MixedMatrixTestsUnion1 converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_50 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.MixedMatrixTestsUnion1);
- public Type TargetType => typeof(global::TUnit.TestProject.MixedMatrixTests.Enum5);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is global::TUnit.TestProject.MixedMatrixTests.Enum5 targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.MixedMatrixTestsUnion1 sourceTypedValue)
- {
- global::TUnit.TestProject.MixedMatrixTests.Enum5 converted = (global::TUnit.TestProject.MixedMatrixTests.Enum5)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_51 : IAotConverter
-{
- public Type SourceType => typeof(string);
- public Type TargetType => typeof(global::TUnit.TestProject.MixedMatrixTestsUnion1);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is global::TUnit.TestProject.MixedMatrixTestsUnion1 targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is string sourceTypedValue)
- {
- global::TUnit.TestProject.MixedMatrixTestsUnion1 converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_52 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.MixedMatrixTestsUnion1);
- public Type TargetType => typeof(string);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is string targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.MixedMatrixTestsUnion1 sourceTypedValue)
- {
- string converted = (string)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_53 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.MixedMatrixTests.Enum4);
- public Type TargetType => typeof(global::TUnit.TestProject.MixedMatrixTestsUnion2);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is global::TUnit.TestProject.MixedMatrixTestsUnion2 targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.MixedMatrixTests.Enum4 sourceTypedValue)
- {
- global::TUnit.TestProject.MixedMatrixTestsUnion2 converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_54 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.MixedMatrixTestsUnion2);
- public Type TargetType => typeof(global::TUnit.TestProject.MixedMatrixTests.Enum4);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is global::TUnit.TestProject.MixedMatrixTests.Enum4 targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.MixedMatrixTestsUnion2 sourceTypedValue)
- {
- global::TUnit.TestProject.MixedMatrixTests.Enum4 converted = (global::TUnit.TestProject.MixedMatrixTests.Enum4)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_55 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.MixedMatrixTests.Enum5);
- public Type TargetType => typeof(global::TUnit.TestProject.MixedMatrixTestsUnion2);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is global::TUnit.TestProject.MixedMatrixTestsUnion2 targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.MixedMatrixTests.Enum5 sourceTypedValue)
- {
- global::TUnit.TestProject.MixedMatrixTestsUnion2 converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_56 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.MixedMatrixTestsUnion2);
- public Type TargetType => typeof(global::TUnit.TestProject.MixedMatrixTests.Enum5);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is global::TUnit.TestProject.MixedMatrixTests.Enum5 targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.MixedMatrixTestsUnion2 sourceTypedValue)
- {
- global::TUnit.TestProject.MixedMatrixTests.Enum5 converted = (global::TUnit.TestProject.MixedMatrixTests.Enum5)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_57 : IAotConverter
-{
- public Type SourceType => typeof(string);
- public Type TargetType => typeof(global::TUnit.TestProject.MixedMatrixTestsUnion2);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is global::TUnit.TestProject.MixedMatrixTestsUnion2 targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is string sourceTypedValue)
- {
- global::TUnit.TestProject.MixedMatrixTestsUnion2 converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_58 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.MixedMatrixTestsUnion2);
- public Type TargetType => typeof(string);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is string targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.MixedMatrixTestsUnion2 sourceTypedValue)
- {
- string converted = (string)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_59 : IAotConverter
-{
- public Type SourceType => typeof(decimal);
- public Type TargetType => typeof(decimal?);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is decimal targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is decimal sourceTypedValue)
- {
- decimal? converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_60 : IAotConverter
-{
- public Type SourceType => typeof(decimal?);
- public Type TargetType => typeof(decimal);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is decimal targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is decimal sourceTypedValue)
- {
- decimal converted = (decimal)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_61 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.TestCountVerificationTests.TestDataSource);
- public Type TargetType => typeof(int);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is int targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.TestCountVerificationTests.TestDataSource sourceTypedValue)
- {
- int converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_62 : IAotConverter
-{
- public Type SourceType => typeof(int);
- public Type TargetType => typeof(global::TUnit.TestProject.Bugs._2757.Foo);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is global::TUnit.TestProject.Bugs._2757.Foo targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is int sourceTypedValue)
- {
- global::TUnit.TestProject.Bugs._2757.Foo converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_63 : IAotConverter
-{
- public Type SourceType => typeof(global::System.ValueTuple);
- public Type TargetType => typeof(global::TUnit.TestProject.Bugs._2798.Foo);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is global::TUnit.TestProject.Bugs._2798.Foo targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::System.ValueTuple sourceTypedValue)
- {
- global::TUnit.TestProject.Bugs._2798.Foo converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_64 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.Bugs._3185.FlagMock);
- public Type TargetType => typeof(global::TUnit.TestProject.Bugs._3185.FlagMock?);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is global::TUnit.TestProject.Bugs._3185.FlagMock targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.Bugs._3185.FlagMock sourceTypedValue)
- {
- global::TUnit.TestProject.Bugs._3185.FlagMock? converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_65 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.Bugs._3185.FlagMock?);
- public Type TargetType => typeof(global::TUnit.TestProject.Bugs._3185.FlagMock);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is global::TUnit.TestProject.Bugs._3185.FlagMock targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.Bugs._3185.FlagMock sourceTypedValue)
- {
- global::TUnit.TestProject.Bugs._3185.FlagMock converted = (global::TUnit.TestProject.Bugs._3185.FlagMock)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_66 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.Bugs._3185.RegularEnum);
- public Type TargetType => typeof(global::TUnit.TestProject.Bugs._3185.RegularEnum?);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is global::TUnit.TestProject.Bugs._3185.RegularEnum targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.Bugs._3185.RegularEnum sourceTypedValue)
- {
- global::TUnit.TestProject.Bugs._3185.RegularEnum? converted = sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal sealed class AotConverter_67 : IAotConverter
-{
- public Type SourceType => typeof(global::TUnit.TestProject.Bugs._3185.RegularEnum?);
- public Type TargetType => typeof(global::TUnit.TestProject.Bugs._3185.RegularEnum);
- public object? Convert(object? value)
- {
- if (value == null) return null;
- if (value is global::TUnit.TestProject.Bugs._3185.RegularEnum targetTypedValue)
- {
- return targetTypedValue;
- }
- if (value is global::TUnit.TestProject.Bugs._3185.RegularEnum sourceTypedValue)
- {
- global::TUnit.TestProject.Bugs._3185.RegularEnum converted = (global::TUnit.TestProject.Bugs._3185.RegularEnum)sourceTypedValue;
- return converted;
- }
- return value; // Return original value if type doesn't match
- }
-}
-internal static class AotConverterRegistration
-{
- [global::System.Runtime.CompilerServices.ModuleInitializer]
- [global::System.Diagnostics.CodeAnalysis.SuppressMessage("Performance", "CA2255:The 'ModuleInitializer' attribute should not be used in libraries",
- Justification = "Test framework needs to register AOT converters for conversion operators")]
- public static void Initialize()
- {
- AotConverterRegistry.Register(new AotConverter_0());
- AotConverterRegistry.Register(new AotConverter_1());
- AotConverterRegistry.Register(new AotConverter_2());
- AotConverterRegistry.Register(new AotConverter_3());
- AotConverterRegistry.Register(new AotConverter_4());
- AotConverterRegistry.Register(new AotConverter_5());
- AotConverterRegistry.Register(new AotConverter_6());
- AotConverterRegistry.Register(new AotConverter_7());
- AotConverterRegistry.Register(new AotConverter_8());
- AotConverterRegistry.Register(new AotConverter_9());
- AotConverterRegistry.Register(new AotConverter_10());
- AotConverterRegistry.Register(new AotConverter_11());
- AotConverterRegistry.Register(new AotConverter_12());
- AotConverterRegistry.Register(new AotConverter_13());
- AotConverterRegistry.Register(new AotConverter_14());
- AotConverterRegistry.Register(new AotConverter_15());
- AotConverterRegistry.Register(new AotConverter_16());
- AotConverterRegistry.Register(new AotConverter_17());
- AotConverterRegistry.Register(new AotConverter_18());
- AotConverterRegistry.Register(new AotConverter_19());
- AotConverterRegistry.Register(new AotConverter_20());
- AotConverterRegistry.Register(new AotConverter_21());
- AotConverterRegistry.Register(new AotConverter_22());
- AotConverterRegistry.Register(new AotConverter_23());
- AotConverterRegistry.Register(new AotConverter_24());
- AotConverterRegistry.Register(new AotConverter_25());
- AotConverterRegistry.Register(new AotConverter_26());
- AotConverterRegistry.Register(new AotConverter_27());
- AotConverterRegistry.Register(new AotConverter_28());
- AotConverterRegistry.Register(new AotConverter_29());
- AotConverterRegistry.Register(new AotConverter_30());
- AotConverterRegistry.Register(new AotConverter_31());
- AotConverterRegistry.Register(new AotConverter_32());
- AotConverterRegistry.Register(new AotConverter_33());
- AotConverterRegistry.Register(new AotConverter_34());
- AotConverterRegistry.Register(new AotConverter_35());
- AotConverterRegistry.Register(new AotConverter_36());
- AotConverterRegistry.Register(new AotConverter_37());
- AotConverterRegistry.Register(new AotConverter_38());
- AotConverterRegistry.Register(new AotConverter_39());
- AotConverterRegistry.Register(new AotConverter_40());
- AotConverterRegistry.Register(new AotConverter_41());
- AotConverterRegistry.Register(new AotConverter_42());
- AotConverterRegistry.Register(new AotConverter_43());
- AotConverterRegistry.Register(new AotConverter_44());
- AotConverterRegistry.Register(new AotConverter_45());
- AotConverterRegistry.Register(new AotConverter_46());
- AotConverterRegistry.Register(new AotConverter_47());
- AotConverterRegistry.Register(new AotConverter_48());
- AotConverterRegistry.Register(new AotConverter_49());
- AotConverterRegistry.Register(new AotConverter_50());
- AotConverterRegistry.Register(new AotConverter_51());
- AotConverterRegistry.Register(new AotConverter_52());
- AotConverterRegistry.Register(new AotConverter_53());
- AotConverterRegistry.Register(new AotConverter_54());
- AotConverterRegistry.Register(new AotConverter_55());
- AotConverterRegistry.Register(new AotConverter_56());
- AotConverterRegistry.Register(new AotConverter_57());
- AotConverterRegistry.Register(new AotConverter_58());
- AotConverterRegistry.Register(new AotConverter_59());
- AotConverterRegistry.Register(new AotConverter_60());
- AotConverterRegistry.Register(new AotConverter_61());
- AotConverterRegistry.Register(new AotConverter_62());
- AotConverterRegistry.Register(new AotConverter_63());
- AotConverterRegistry.Register(new AotConverter_64());
- AotConverterRegistry.Register(new AotConverter_65());
- AotConverterRegistry.Register(new AotConverter_66());
- AotConverterRegistry.Register(new AotConverter_67());
- }
-}
diff --git a/TUnit.Core.SourceGenerator.Tests/ArgsAsArrayTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ArgsAsArrayTests.Test.verified.txt
index 4bd714eb7b..a8b459eccf 100644
--- a/TUnit.Core.SourceGenerator.Tests/ArgsAsArrayTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ArgsAsArrayTests.Test.verified.txt
@@ -53,32 +53,32 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Collect
}
case 1:
{
- instance.Params((args[0] is null ? null : args[0] is string[] arr ? arr : new string[] { global::TUnit.Core.Helpers.CastHelper.Cast(args[0]) }));
+ instance.Params((args[0] is null ? null : args[0] is string[] arr ? arr : new string[] { (string)args[0] }));
return default(global::System.Threading.Tasks.ValueTask);
}
case 2:
{
- instance.Params(new string[] { global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]) });
+ instance.Params(new string[] { (string)args[0], (string)args[1] });
return default(global::System.Threading.Tasks.ValueTask);
}
case 3:
{
- instance.Params(new string[] { global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]) });
+ instance.Params(new string[] { (string)args[0], (string)args[1], (string)args[2] });
return default(global::System.Threading.Tasks.ValueTask);
}
case 4:
{
- instance.Params(new string[] { global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]), global::TUnit.Core.Helpers.CastHelper.Cast(args[3]) });
+ instance.Params(new string[] { (string)args[0], (string)args[1], (string)args[2], (string)args[3] });
return default(global::System.Threading.Tasks.ValueTask);
}
case 5:
{
- instance.Params(new string[] { global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]), global::TUnit.Core.Helpers.CastHelper.Cast(args[3]), global::TUnit.Core.Helpers.CastHelper.Cast(args[4]) });
+ instance.Params(new string[] { (string)args[0], (string)args[1], (string)args[2], (string)args[3], (string)args[4] });
return default(global::System.Threading.Tasks.ValueTask);
}
case 6:
{
- instance.Params(new string[] { global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]), global::TUnit.Core.Helpers.CastHelper.Cast(args[3]), global::TUnit.Core.Helpers.CastHelper.Cast(args[4]), global::TUnit.Core.Helpers.CastHelper.Cast(args[5]) });
+ instance.Params(new string[] { (string)args[0], (string)args[1], (string)args[2], (string)args[3], (string)args[4], (string)args[5] });
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -98,37 +98,37 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Collect
{
case 0:
{
- instance.ParamsEnumerable(global::TUnit.Core.Helpers.CastHelper.Cast>(args[0]));
+ instance.ParamsEnumerable(new string[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
case 1:
{
- instance.ParamsEnumerable(global::TUnit.Core.Helpers.CastHelper.Cast>(args[0]));
+ instance.ParamsEnumerable((args[0] is null ? null : args[0] is global::System.Collections.Generic.IEnumerable arr ? arr : new string[] { (string)args[0] }));
return default(global::System.Threading.Tasks.ValueTask);
}
case 2:
{
- instance.ParamsEnumerable(global::TUnit.Core.Helpers.CastHelper.Cast>(args[0]));
+ instance.ParamsEnumerable(new string[] { (string)args[0], (string)args[1] });
return default(global::System.Threading.Tasks.ValueTask);
}
case 3:
{
- instance.ParamsEnumerable(global::TUnit.Core.Helpers.CastHelper.Cast>(args[0]));
+ instance.ParamsEnumerable(new string[] { (string)args[0], (string)args[1], (string)args[2] });
return default(global::System.Threading.Tasks.ValueTask);
}
case 4:
{
- instance.ParamsEnumerable(global::TUnit.Core.Helpers.CastHelper.Cast>(args[0]));
+ instance.ParamsEnumerable(new string[] { (string)args[0], (string)args[1], (string)args[2], (string)args[3] });
return default(global::System.Threading.Tasks.ValueTask);
}
case 5:
{
- instance.ParamsEnumerable(global::TUnit.Core.Helpers.CastHelper.Cast>(args[0]));
+ instance.ParamsEnumerable(new string[] { (string)args[0], (string)args[1], (string)args[2], (string)args[3], (string)args[4] });
return default(global::System.Threading.Tasks.ValueTask);
}
case 6:
{
- instance.ParamsEnumerable(global::TUnit.Core.Helpers.CastHelper.Cast>(args[0]));
+ instance.ParamsEnumerable(new string[] { (string)args[0], (string)args[1], (string)args[2], (string)args[3], (string)args[4], (string)args[5] });
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -148,37 +148,37 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Collect
{
case 1:
{
- instance.Following_Non_Params(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast>(args[1]));
+ instance.Following_Non_Params((int)args[0], new string[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
case 2:
{
- instance.Following_Non_Params(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast>(args[1]));
+ instance.Following_Non_Params((int)args[0], (args[1] is null ? null : args[1] is global::System.Collections.Generic.IEnumerable arr ? arr : new string[] { (string)args[1] }));
return default(global::System.Threading.Tasks.ValueTask);
}
case 3:
{
- instance.Following_Non_Params(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast>(args[1]));
+ instance.Following_Non_Params((int)args[0], new string[] { (string)args[1], (string)args[2] });
return default(global::System.Threading.Tasks.ValueTask);
}
case 4:
{
- instance.Following_Non_Params(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast>(args[1]));
+ instance.Following_Non_Params((int)args[0], new string[] { (string)args[1], (string)args[2], (string)args[3] });
return default(global::System.Threading.Tasks.ValueTask);
}
case 5:
{
- instance.Following_Non_Params(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast>(args[1]));
+ instance.Following_Non_Params((int)args[0], new string[] { (string)args[1], (string)args[2], (string)args[3], (string)args[4] });
return default(global::System.Threading.Tasks.ValueTask);
}
case 6:
{
- instance.Following_Non_Params(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast>(args[1]));
+ instance.Following_Non_Params((int)args[0], new string[] { (string)args[1], (string)args[2], (string)args[3], (string)args[4], (string)args[5] });
return default(global::System.Threading.Tasks.ValueTask);
}
case 7:
{
- instance.Following_Non_Params(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast>(args[1]));
+ instance.Following_Non_Params((int)args[0], new string[] { (string)args[1], (string)args[2], (string)args[3], (string)args[4], (string)args[5], (string)args[6] });
return default(global::System.Threading.Tasks.ValueTask);
}
default:
diff --git a/TUnit.Core.SourceGenerator.Tests/ArgumentWithImplicitConverterTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ArgumentWithImplicitConverterTests.Test.verified.txt
index 4d4f8cd19b..c03f6969d6 100644
--- a/TUnit.Core.SourceGenerator.Tests/ArgumentWithImplicitConverterTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ArgumentWithImplicitConverterTests.Test.verified.txt
@@ -43,7 +43,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 1:
{
- instance.Explicit(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.Explicit((global::TUnit.TestProject.ExplicitInteger)(int)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -63,7 +63,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 1:
{
- instance.Implicit(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.Implicit((global::TUnit.TestProject.ImplicitInteger)(int)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
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 4086603606..c7a10a0de9 100644
--- a/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.Net4_7.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/AssemblyLoaderTests.Test.Net4_7.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
#nullable enable
diff --git a/TUnit.Core.SourceGenerator.Tests/Basic.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/Basic.Test.verified.txt
index 5f282702bb..e69de29bb2 100644
--- a/TUnit.Core.SourceGenerator.Tests/Basic.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/Basic.Test.verified.txt
@@ -1 +0,0 @@
-
\ No newline at end of file
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 4086603606..c7a10a0de9 100644
--- a/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.Net4_7.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/BasicTests.Test.Net4_7.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
#nullable enable
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 0467212ff8..506a18ca13 100644
--- a/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.Net4_7.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/Bugs2971NullableTypeTest.Test.Net4_7.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
#nullable enable
diff --git a/TUnit.Core.SourceGenerator.Tests/ClassAndMethodArgumentsTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ClassAndMethodArgumentsTests.Test.verified.txt
index 92d82718eb..b87eda6aba 100644
--- a/TUnit.Core.SourceGenerator.Tests/ClassAndMethodArgumentsTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ClassAndMethodArgumentsTests.Test.verified.txt
@@ -33,7 +33,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(string), "arg2", new g
});
private static global::TUnit.TestProject.ClassAndMethodArgumentsTests __CreateInstance(global::System.Type[] typeArgs, object?[] args)
{
- return new global::TUnit.TestProject.ClassAndMethodArgumentsTests(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ return new global::TUnit.TestProject.ClassAndMethodArgumentsTests((string)args[0]);
}
private static global::System.Threading.Tasks.ValueTask __Invoke(global::TUnit.TestProject.ClassAndMethodArgumentsTests instance, int methodIndex, object?[] args, global::System.Threading.CancellationToken cancellationToken)
{
@@ -58,7 +58,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(string), "arg2", new g
{
case 1:
{
- return new global::System.Threading.Tasks.ValueTask(instance.WithMethodLevel(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])));
+ return new global::System.Threading.Tasks.ValueTask(instance.WithMethodLevel((string)args[0]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}");
@@ -77,7 +77,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(string), "arg2", new g
{
case 1:
{
- return new global::System.Threading.Tasks.ValueTask(instance.IgnoreParameters(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])));
+ return new global::System.Threading.Tasks.ValueTask(instance.IgnoreParameters((string)args[0]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}");
diff --git a/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests.Test.verified.txt
index cbf117d53a..0d66926c12 100644
--- a/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests.Test.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
#nullable enable
@@ -73,7 +73,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 1:
{
- instance.DataSource_Class(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.DataSource_Class((global::TUnit.TestProject.Library.Models.SomeAsyncDisposableClass)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -93,7 +93,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 1:
{
- instance.DataSource_Class_Generic(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.DataSource_Class_Generic((global::TUnit.TestProject.Library.Models.SomeAsyncDisposableClass)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -113,7 +113,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 1:
{
- return new global::System.Threading.Tasks.ValueTask(instance.IsInitialized_With_1_ClassDataSource(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])));
+ return new global::System.Threading.Tasks.ValueTask(instance.IsInitialized_With_1_ClassDataSource((global::TUnit.TestProject.Library.Models.InitializableClass)args[0]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}");
@@ -132,7 +132,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 2:
{
- return new global::System.Threading.Tasks.ValueTask(instance.IsInitialized_With_2_ClassDataSources(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1])));
+ return new global::System.Threading.Tasks.ValueTask(instance.IsInitialized_With_2_ClassDataSources((global::TUnit.TestProject.Library.Models.InitializableClass)args[0], (global::TUnit.TestProject.Library.Models.InitializableClass)args[1]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 2 arguments, but got {args.Length}");
@@ -151,7 +151,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 3:
{
- return new global::System.Threading.Tasks.ValueTask(instance.IsInitialized_With_3_ClassDataSources(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2])));
+ return new global::System.Threading.Tasks.ValueTask(instance.IsInitialized_With_3_ClassDataSources((global::TUnit.TestProject.Library.Models.InitializableClass)args[0], (global::TUnit.TestProject.Library.Models.InitializableClass)args[1], (global::TUnit.TestProject.Library.Models.InitializableClass)args[2]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 3 arguments, but got {args.Length}");
@@ -170,7 +170,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 4:
{
- return new global::System.Threading.Tasks.ValueTask(instance.IsInitialized_With_4_ClassDataSources(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]), global::TUnit.Core.Helpers.CastHelper.Cast(args[3])));
+ return new global::System.Threading.Tasks.ValueTask(instance.IsInitialized_With_4_ClassDataSources((global::TUnit.TestProject.Library.Models.InitializableClass)args[0], (global::TUnit.TestProject.Library.Models.InitializableClass)args[1], (global::TUnit.TestProject.Library.Models.InitializableClass)args[2], (global::TUnit.TestProject.Library.Models.InitializableClass)args[3]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 4 arguments, but got {args.Length}");
@@ -189,7 +189,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 5:
{
- return new global::System.Threading.Tasks.ValueTask(instance.IsInitialized_With_5_ClassDataSources(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]), global::TUnit.Core.Helpers.CastHelper.Cast(args[3]), global::TUnit.Core.Helpers.CastHelper.Cast(args[4])));
+ return new global::System.Threading.Tasks.ValueTask(instance.IsInitialized_With_5_ClassDataSources((global::TUnit.TestProject.Library.Models.InitializableClass)args[0], (global::TUnit.TestProject.Library.Models.InitializableClass)args[1], (global::TUnit.TestProject.Library.Models.InitializableClass)args[2], (global::TUnit.TestProject.Library.Models.InitializableClass)args[3], (global::TUnit.TestProject.Library.Models.InitializableClass)args[4]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 5 arguments, but got {args.Length}");
diff --git a/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests2.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests2.Test.verified.txt
index 8d9a296e22..dd1bfd32a1 100644
--- a/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests2.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTests2.Test.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
#nullable enable
@@ -26,7 +26,7 @@ internal static class TUnit_TestProject_ClassDataSourceDrivenTests2__TestSource
private static readonly global::TUnit.Core.MethodMetadata __mm_1 = global::TUnit.Core.MethodMetadataFactory.Create("Base_Derived2", __classType, typeof(void), __classMetadata);
private static global::TUnit.TestProject.ClassDataSourceDrivenTests2 __CreateInstance(global::System.Type[] typeArgs, object?[] args)
{
- return new global::TUnit.TestProject.ClassDataSourceDrivenTests2(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ return new global::TUnit.TestProject.ClassDataSourceDrivenTests2((args[0] switch { global::TUnit.TestProject.ClassDataSourceDrivenTests2.Derived1 __s => (global::TUnit.TestProject.ClassDataSourceDrivenTests2.Base)__s, global::TUnit.TestProject.ClassDataSourceDrivenTests2.Derived2 __s => (global::TUnit.TestProject.ClassDataSourceDrivenTests2.Base)__s, _ => global::TUnit.Core.Helpers.CastHelper.Cast(args[0]) }));
}
private static global::System.Threading.Tasks.ValueTask __Invoke(global::TUnit.TestProject.ClassDataSourceDrivenTests2 instance, int methodIndex, object?[] args, global::System.Threading.CancellationToken cancellationToken)
{
diff --git a/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTestsSharedKeyed.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTestsSharedKeyed.Test.verified.txt
index 1d2d7b5c14..a0f43abe99 100644
--- a/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTestsSharedKeyed.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ClassDataSourceDrivenTestsSharedKeyed.Test.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
#nullable enable
@@ -43,7 +43,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 1:
{
- instance.DataSource_Class(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.DataSource_Class((global::TUnit.TestProject.Library.Models.SomeAsyncDisposableClass)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -63,7 +63,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 1:
{
- instance.DataSource_Class_Generic(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.DataSource_Class_Generic((global::TUnit.TestProject.Library.Models.SomeAsyncDisposableClass)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.Net4_7.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.Net4_7.verified.txt
index 4086603606..c7a10a0de9 100644
--- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.Net4_7.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.BasicTest_WithConflictingNamespace.Net4_7.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
#nullable enable
diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet10_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet10_0.verified.txt
index d755ba780c..a7b4b28191 100644
--- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet10_0.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet10_0.verified.txt
@@ -76,7 +76,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.DataSource_Method(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.DataSource_Method((int)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -96,7 +96,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 2:
{
- instance.DataSource_Method(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]));
+ instance.DataSource_Method((int)args[0], (string)args[1]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -116,7 +116,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.EnumValue(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.EnumValue((args[0] switch { global::TUnit.TestProject.TestEnum __s => __s, int __s => (global::TUnit.TestProject.TestEnum)__s, _ => global::TUnit.Core.Helpers.CastHelper.Cast(args[0]) }));
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -156,7 +156,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.EmptyString(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.EmptyString((string)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -176,7 +176,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.NonEmptyString(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.NonEmptyString((string)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -216,7 +216,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.Type(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.Type((global::System.Type)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -236,7 +236,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.IntegerArray(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.IntegerArray((int[])args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -256,7 +256,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.IntMaxValue(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.IntMaxValue((int)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet8_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet8_0.verified.txt
index d755ba780c..a7b4b28191 100644
--- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet8_0.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet8_0.verified.txt
@@ -76,7 +76,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.DataSource_Method(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.DataSource_Method((int)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -96,7 +96,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 2:
{
- instance.DataSource_Method(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]));
+ instance.DataSource_Method((int)args[0], (string)args[1]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -116,7 +116,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.EnumValue(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.EnumValue((args[0] switch { global::TUnit.TestProject.TestEnum __s => __s, int __s => (global::TUnit.TestProject.TestEnum)__s, _ => global::TUnit.Core.Helpers.CastHelper.Cast(args[0]) }));
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -156,7 +156,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.EmptyString(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.EmptyString((string)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -176,7 +176,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.NonEmptyString(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.NonEmptyString((string)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -216,7 +216,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.Type(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.Type((global::System.Type)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -236,7 +236,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.IntegerArray(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.IntegerArray((int[])args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -256,7 +256,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.IntMaxValue(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.IntMaxValue((int)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet9_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet9_0.verified.txt
index d755ba780c..a7b4b28191 100644
--- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet9_0.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.DotNet9_0.verified.txt
@@ -76,7 +76,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.DataSource_Method(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.DataSource_Method((int)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -96,7 +96,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 2:
{
- instance.DataSource_Method(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]));
+ instance.DataSource_Method((int)args[0], (string)args[1]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -116,7 +116,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.EnumValue(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.EnumValue((args[0] switch { global::TUnit.TestProject.TestEnum __s => __s, int __s => (global::TUnit.TestProject.TestEnum)__s, _ => global::TUnit.Core.Helpers.CastHelper.Cast(args[0]) }));
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -156,7 +156,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.EmptyString(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.EmptyString((string)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -176,7 +176,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.NonEmptyString(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.NonEmptyString((string)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -216,7 +216,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.Type(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.Type((global::System.Type)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -236,7 +236,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.IntegerArray(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.IntegerArray((int[])args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -256,7 +256,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.IntMaxValue(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.IntMaxValue((int)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.Net4_7.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.Net4_7.verified.txt
index d1793df3ab..c8c83e5d1e 100644
--- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.Net4_7.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.DataDrivenTest_WithConflictingNamespace.Net4_7.verified.txt
@@ -76,7 +76,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.DataSource_Method(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.DataSource_Method((int)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -96,7 +96,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 2:
{
- instance.DataSource_Method(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]));
+ instance.DataSource_Method((int)args[0], (string)args[1]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -116,7 +116,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.EnumValue(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.EnumValue((args[0] switch { global::TUnit.TestProject.TestEnum __s => __s, int __s => (global::TUnit.TestProject.TestEnum)__s, _ => global::TUnit.Core.Helpers.CastHelper.Cast(args[0]) }));
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -156,7 +156,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.EmptyString(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.EmptyString((string)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -176,7 +176,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.NonEmptyString(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.NonEmptyString((string)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -216,7 +216,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.Type(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.Type((global::System.Type)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -236,7 +236,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.IntegerArray(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.IntegerArray((int[])args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -256,7 +256,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.IntMaxValue(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.IntMaxValue((int)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.Net4_7.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.Net4_7.verified.txt
index 731032feb0..2f50bccc15 100644
--- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.Net4_7.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.HooksTest_WithConflictingNamespace.Net4_7.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
#nullable enable
diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet10_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet10_0.verified.txt
index ebe16e36c3..910f38a52c 100644
--- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet10_0.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet10_0.verified.txt
@@ -100,7 +100,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 3:
{
- return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_One(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2])));
+ return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_One((string)args[0], (int)args[1], (bool)args[2]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 3 arguments, but got {args.Length}");
@@ -119,7 +119,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 4:
{
- return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_Two(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]), global::TUnit.Core.Helpers.CastHelper.Cast(args[3])));
+ return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_Two((int)args[0], (int)args[1], (int)args[2], (bool)args[3]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 4 arguments, but got {args.Length}");
@@ -138,7 +138,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 3:
{
- return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_Enum(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2])));
+ return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_Enum((int)args[0], global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), (TestEnum?)args[2]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 3 arguments, but got {args.Length}");
@@ -157,7 +157,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 2:
{
- return new global::System.Threading.Tasks.ValueTask(instance.AutoGenerateBools(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1])));
+ return new global::System.Threading.Tasks.ValueTask(instance.AutoGenerateBools((string)args[0], (bool)args[1]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 2 arguments, but got {args.Length}");
@@ -176,7 +176,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 2:
{
- return new global::System.Threading.Tasks.ValueTask(instance.AutoGenerateBools2(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1])));
+ return new global::System.Threading.Tasks.ValueTask(instance.AutoGenerateBools2((string)args[0], global::TUnit.Core.Helpers.CastHelper.Cast(args[1])));
}
default:
throw new global::System.ArgumentException($"Expected exactly 2 arguments, but got {args.Length}");
@@ -328,7 +328,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 2:
{
- return new global::System.Threading.Tasks.ValueTask(instance.MatrixMethod_WithEnumParameter_UsesOnlyMethodValues(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1])));
+ return new global::System.Threading.Tasks.ValueTask(instance.MatrixMethod_WithEnumParameter_UsesOnlyMethodValues((bool)args[0], global::TUnit.Core.Helpers.CastHelper.Cast(args[1])));
}
default:
throw new global::System.ArgumentException($"Expected exactly 2 arguments, but got {args.Length}");
diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet8_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet8_0.verified.txt
index ebe16e36c3..910f38a52c 100644
--- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet8_0.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet8_0.verified.txt
@@ -100,7 +100,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 3:
{
- return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_One(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2])));
+ return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_One((string)args[0], (int)args[1], (bool)args[2]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 3 arguments, but got {args.Length}");
@@ -119,7 +119,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 4:
{
- return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_Two(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]), global::TUnit.Core.Helpers.CastHelper.Cast(args[3])));
+ return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_Two((int)args[0], (int)args[1], (int)args[2], (bool)args[3]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 4 arguments, but got {args.Length}");
@@ -138,7 +138,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 3:
{
- return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_Enum(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2])));
+ return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_Enum((int)args[0], global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), (TestEnum?)args[2]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 3 arguments, but got {args.Length}");
@@ -157,7 +157,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 2:
{
- return new global::System.Threading.Tasks.ValueTask(instance.AutoGenerateBools(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1])));
+ return new global::System.Threading.Tasks.ValueTask(instance.AutoGenerateBools((string)args[0], (bool)args[1]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 2 arguments, but got {args.Length}");
@@ -176,7 +176,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 2:
{
- return new global::System.Threading.Tasks.ValueTask(instance.AutoGenerateBools2(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1])));
+ return new global::System.Threading.Tasks.ValueTask(instance.AutoGenerateBools2((string)args[0], global::TUnit.Core.Helpers.CastHelper.Cast(args[1])));
}
default:
throw new global::System.ArgumentException($"Expected exactly 2 arguments, but got {args.Length}");
@@ -328,7 +328,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 2:
{
- return new global::System.Threading.Tasks.ValueTask(instance.MatrixMethod_WithEnumParameter_UsesOnlyMethodValues(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1])));
+ return new global::System.Threading.Tasks.ValueTask(instance.MatrixMethod_WithEnumParameter_UsesOnlyMethodValues((bool)args[0], global::TUnit.Core.Helpers.CastHelper.Cast(args[1])));
}
default:
throw new global::System.ArgumentException($"Expected exactly 2 arguments, but got {args.Length}");
diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet9_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet9_0.verified.txt
index ebe16e36c3..910f38a52c 100644
--- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet9_0.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.DotNet9_0.verified.txt
@@ -100,7 +100,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 3:
{
- return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_One(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2])));
+ return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_One((string)args[0], (int)args[1], (bool)args[2]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 3 arguments, but got {args.Length}");
@@ -119,7 +119,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 4:
{
- return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_Two(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]), global::TUnit.Core.Helpers.CastHelper.Cast(args[3])));
+ return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_Two((int)args[0], (int)args[1], (int)args[2], (bool)args[3]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 4 arguments, but got {args.Length}");
@@ -138,7 +138,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 3:
{
- return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_Enum(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2])));
+ return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_Enum((int)args[0], global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), (TestEnum?)args[2]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 3 arguments, but got {args.Length}");
@@ -157,7 +157,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 2:
{
- return new global::System.Threading.Tasks.ValueTask(instance.AutoGenerateBools(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1])));
+ return new global::System.Threading.Tasks.ValueTask(instance.AutoGenerateBools((string)args[0], (bool)args[1]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 2 arguments, but got {args.Length}");
@@ -176,7 +176,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 2:
{
- return new global::System.Threading.Tasks.ValueTask(instance.AutoGenerateBools2(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1])));
+ return new global::System.Threading.Tasks.ValueTask(instance.AutoGenerateBools2((string)args[0], global::TUnit.Core.Helpers.CastHelper.Cast(args[1])));
}
default:
throw new global::System.ArgumentException($"Expected exactly 2 arguments, but got {args.Length}");
@@ -328,7 +328,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 2:
{
- return new global::System.Threading.Tasks.ValueTask(instance.MatrixMethod_WithEnumParameter_UsesOnlyMethodValues(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1])));
+ return new global::System.Threading.Tasks.ValueTask(instance.MatrixMethod_WithEnumParameter_UsesOnlyMethodValues((bool)args[0], global::TUnit.Core.Helpers.CastHelper.Cast(args[1])));
}
default:
throw new global::System.ArgumentException($"Expected exactly 2 arguments, but got {args.Length}");
diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.Net4_7.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.Net4_7.verified.txt
index a07386699e..938afac314 100644
--- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.Net4_7.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MatrixTest_WithConflictingNamespace.Net4_7.verified.txt
@@ -100,7 +100,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 3:
{
- return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_One(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2])));
+ return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_One((string)args[0], (int)args[1], (bool)args[2]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 3 arguments, but got {args.Length}");
@@ -119,7 +119,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 4:
{
- return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_Two(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]), global::TUnit.Core.Helpers.CastHelper.Cast(args[3])));
+ return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_Two((int)args[0], (int)args[1], (int)args[2], (bool)args[3]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 4 arguments, but got {args.Length}");
@@ -138,7 +138,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 3:
{
- return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_Enum(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2])));
+ return new global::System.Threading.Tasks.ValueTask(instance.MatrixTest_Enum((int)args[0], global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), (TestEnum?)args[2]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 3 arguments, but got {args.Length}");
@@ -157,7 +157,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 2:
{
- return new global::System.Threading.Tasks.ValueTask(instance.AutoGenerateBools(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1])));
+ return new global::System.Threading.Tasks.ValueTask(instance.AutoGenerateBools((string)args[0], (bool)args[1]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 2 arguments, but got {args.Length}");
@@ -176,7 +176,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 2:
{
- return new global::System.Threading.Tasks.ValueTask(instance.AutoGenerateBools2(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1])));
+ return new global::System.Threading.Tasks.ValueTask(instance.AutoGenerateBools2((string)args[0], global::TUnit.Core.Helpers.CastHelper.Cast(args[1])));
}
default:
throw new global::System.ArgumentException($"Expected exactly 2 arguments, but got {args.Length}");
@@ -328,7 +328,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::TUnit.TestProj
{
case 2:
{
- return new global::System.Threading.Tasks.ValueTask(instance.MatrixMethod_WithEnumParameter_UsesOnlyMethodValues(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1])));
+ return new global::System.Threading.Tasks.ValueTask(instance.MatrixMethod_WithEnumParameter_UsesOnlyMethodValues((bool)args[0], global::TUnit.Core.Helpers.CastHelper.Cast(args[1])));
}
default:
throw new global::System.ArgumentException($"Expected exactly 2 arguments, but got {args.Length}");
diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.Net4_7.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.Net4_7.verified.txt
index 2e2148a732..17e51d2fa4 100644
--- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.Net4_7.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.MethodDataSource_WithConflictingNamespace.Net4_7.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
#nullable enable
diff --git a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.Net4_7.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.Net4_7.verified.txt
index 0a26c26995..f8e5acfcdf 100644
--- a/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.Net4_7.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ConflictingNamespaceTests.TupleDataSource_WithConflictingNamespace.Net4_7.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
#nullable enable
diff --git a/TUnit.Core.SourceGenerator.Tests/ConstantArgumentsTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConstantArgumentsTests.Test.verified.txt
index eab8497950..c2f04fcade 100644
--- a/TUnit.Core.SourceGenerator.Tests/ConstantArgumentsTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ConstantArgumentsTests.Test.verified.txt
@@ -63,7 +63,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(ulong), "dummy", new g
{
case 1:
{
- return new global::System.Threading.Tasks.ValueTask(instance.String1(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])));
+ return new global::System.Threading.Tasks.ValueTask(instance.String1((string)args[0]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}");
@@ -82,7 +82,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(ulong), "dummy", new g
{
case 1:
{
- return new global::System.Threading.Tasks.ValueTask(instance.Int(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])));
+ return new global::System.Threading.Tasks.ValueTask(instance.Int((int)args[0]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}");
@@ -101,7 +101,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(ulong), "dummy", new g
{
case 1:
{
- return new global::System.Threading.Tasks.ValueTask(instance.Double(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])));
+ return new global::System.Threading.Tasks.ValueTask(instance.Double((double)args[0]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}");
@@ -120,7 +120,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(ulong), "dummy", new g
{
case 1:
{
- return new global::System.Threading.Tasks.ValueTask(instance.Float(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])));
+ return new global::System.Threading.Tasks.ValueTask(instance.Float((float)args[0]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}");
@@ -139,7 +139,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(ulong), "dummy", new g
{
case 1:
{
- return new global::System.Threading.Tasks.ValueTask(instance.Long(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])));
+ return new global::System.Threading.Tasks.ValueTask(instance.Long((long)args[0]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}");
@@ -158,7 +158,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(ulong), "dummy", new g
{
case 1:
{
- return new global::System.Threading.Tasks.ValueTask(instance.UInt(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])));
+ return new global::System.Threading.Tasks.ValueTask(instance.UInt((uint)args[0]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}");
@@ -177,7 +177,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(ulong), "dummy", new g
{
case 1:
{
- return new global::System.Threading.Tasks.ValueTask(instance.ULong(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])));
+ return new global::System.Threading.Tasks.ValueTask(instance.ULong((ulong)args[0]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}");
diff --git a/TUnit.Core.SourceGenerator.Tests/ConstantInBaseClassTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConstantInBaseClassTests.Test.verified.txt
index 189dce3fa8..06a5b68a7d 100644
--- a/TUnit.Core.SourceGenerator.Tests/ConstantInBaseClassTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ConstantInBaseClassTests.Test.verified.txt
@@ -39,7 +39,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(string), "value", new
{
case 1:
{
- return new global::System.Threading.Tasks.ValueTask(instance.SomeTest(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])));
+ return new global::System.Threading.Tasks.ValueTask(instance.SomeTest((string)args[0]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}");
diff --git a/TUnit.Core.SourceGenerator.Tests/ConstantsInInterpolatedStringsTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ConstantsInInterpolatedStringsTests.Test.verified.txt
index dfdc065625..bba5e03427 100644
--- a/TUnit.Core.SourceGenerator.Tests/ConstantsInInterpolatedStringsTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ConstantsInInterpolatedStringsTests.Test.verified.txt
@@ -39,7 +39,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(string), "value", new
{
case 1:
{
- return new global::System.Threading.Tasks.ValueTask(instance.SomeTest(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])));
+ return new global::System.Threading.Tasks.ValueTask(instance.SomeTest((string)args[0]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}");
diff --git a/TUnit.Core.SourceGenerator.Tests/CustomDisplayNameTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/CustomDisplayNameTests.Test.verified.txt
index 95973f1f10..9cb1a4411f 100644
--- a/TUnit.Core.SourceGenerator.Tests/CustomDisplayNameTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/CustomDisplayNameTests.Test.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
#nullable enable
@@ -94,7 +94,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(string), "password", n
{
case 3:
{
- return new global::System.Threading.Tasks.ValueTask(instance.Test3(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2])));
+ return new global::System.Threading.Tasks.ValueTask(instance.Test3((string)args[0], (int)args[1], (bool)args[2]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 3 arguments, but got {args.Length}");
@@ -132,7 +132,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(string), "password", n
{
case 2:
{
- return new global::System.Threading.Tasks.ValueTask(instance.TestParameterNamePrefixBug(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1])));
+ return new global::System.Threading.Tasks.ValueTask(instance.TestParameterNamePrefixBug((int)args[0], (string)args[1]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 2 arguments, but got {args.Length}");
@@ -151,7 +151,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(string), "password", n
{
case 1:
{
- return new global::System.Threading.Tasks.ValueTask(instance.PasswordTest(global::TUnit.Core.Helpers.CastHelper.Cast(args[0])));
+ return new global::System.Threading.Tasks.ValueTask(instance.PasswordTest((string)args[0]));
}
default:
throw new global::System.ArgumentException($"Expected exactly 1 argument, but got {args.Length}");
diff --git a/TUnit.Core.SourceGenerator.Tests/DataDrivenTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/DataDrivenTests.Test.verified.txt
index d755ba780c..c8c83e5d1e 100644
--- a/TUnit.Core.SourceGenerator.Tests/DataDrivenTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/DataDrivenTests.Test.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
#nullable enable
@@ -76,7 +76,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.DataSource_Method(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.DataSource_Method((int)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -96,7 +96,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 2:
{
- instance.DataSource_Method(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]));
+ instance.DataSource_Method((int)args[0], (string)args[1]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -116,7 +116,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.EnumValue(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.EnumValue((args[0] switch { global::TUnit.TestProject.TestEnum __s => __s, int __s => (global::TUnit.TestProject.TestEnum)__s, _ => global::TUnit.Core.Helpers.CastHelper.Cast(args[0]) }));
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -156,7 +156,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.EmptyString(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.EmptyString((string)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -176,7 +176,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.NonEmptyString(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.NonEmptyString((string)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -216,7 +216,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.Type(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.Type((global::System.Type)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -236,7 +236,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.IntegerArray(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.IntegerArray((int[])args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -256,7 +256,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(int), "value", new glo
{
case 1:
{
- instance.IntMaxValue(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.IntMaxValue((int)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
diff --git a/TUnit.Core.SourceGenerator.Tests/DataSourceGeneratorTests.Typed.verified.txt b/TUnit.Core.SourceGenerator.Tests/DataSourceGeneratorTests.Typed.verified.txt
index 7bd5762252..4d12305309 100644
--- a/TUnit.Core.SourceGenerator.Tests/DataSourceGeneratorTests.Typed.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/DataSourceGeneratorTests.Typed.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
#nullable enable
@@ -42,7 +42,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(bool), "value3", new g
});
private static global::TUnit.TestProject.DataSourceGeneratorTests __CreateInstance(global::System.Type[] typeArgs, object?[] args)
{
- return new global::TUnit.TestProject.DataSourceGeneratorTests(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]));
+ return new global::TUnit.TestProject.DataSourceGeneratorTests((args[0] switch { global::System.ValueTuple __s => global::TUnit.Core.Helpers.CastHelper.Cast(__s), int __s => __s, _ => global::TUnit.Core.Helpers.CastHelper.Cast(args[0]) }), (string)args[1], (bool)args[2]);
}
private static global::System.Threading.Tasks.ValueTask __Invoke(global::TUnit.TestProject.DataSourceGeneratorTests instance, int methodIndex, object?[] args, global::System.Threading.CancellationToken cancellationToken)
{
@@ -56,7 +56,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(bool), "value3", new g
{
case 1:
{
- instance.GeneratedData_Method(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.GeneratedData_Method((int)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -76,7 +76,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(bool), "value3", new g
{
case 3:
{
- instance.GeneratedData_Method2(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]));
+ instance.GeneratedData_Method2((int)args[0], (string)args[1], (bool)args[2]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
diff --git a/TUnit.Core.SourceGenerator.Tests/DecimalArgumentTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/DecimalArgumentTests.Test.verified.txt
index 6dbf771d6d..1654b3c7af 100644
--- a/TUnit.Core.SourceGenerator.Tests/DecimalArgumentTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/DecimalArgumentTests.Test.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
#nullable enable
@@ -91,7 +91,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(decimal), "batchingSiz
{
case 2:
{
- return new global::System.Threading.Tasks.ValueTask(instance.Transfer(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1])));
+ return new global::System.Threading.Tasks.ValueTask(instance.Transfer((args[0] switch { double __s => (decimal)__s, int __s => (decimal)__s, _ => global::TUnit.Core.Helpers.CastHelper.Cast(args[0]) }), (args[1] switch { double __s => (decimal)__s, int __s => (decimal)__s, _ => global::TUnit.Core.Helpers.CastHelper.Cast(args[1]) })));
}
default:
throw new global::System.ArgumentException($"Expected exactly 2 arguments, but got {args.Length}");
@@ -224,7 +224,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(decimal), "batchingSiz
{
case 1:
{
- instance.Test(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.Test((args[0] switch { double __s => (decimal)__s, int __s => (decimal)__s, _ => global::TUnit.Core.Helpers.CastHelper.Cast(args[0]) }));
return default(global::System.Threading.Tasks.ValueTask);
}
default:
@@ -244,7 +244,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(decimal), "batchingSiz
{
case 6:
{
- instance.TransactionDiscountCalculations(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]), global::TUnit.Core.Helpers.CastHelper.Cast(args[3]), global::TUnit.Core.Helpers.CastHelper.Cast(args[4]), global::TUnit.Core.Helpers.CastHelper.Cast(args[5]));
+ instance.TransactionDiscountCalculations(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]), global::TUnit.Core.Helpers.CastHelper.Cast(args[1]), global::TUnit.Core.Helpers.CastHelper.Cast(args[2]), global::TUnit.Core.Helpers.CastHelper.Cast(args[3]), global::TUnit.Core.Helpers.CastHelper.Cast(args[4]), (bool)args[5]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
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 4086603606..c7a10a0de9 100644
--- a/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.Net4_7.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/DisableReflectionScannerTests.Test.Net4_7.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
#nullable enable
diff --git a/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet10_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet10_0.verified.txt
index e0a05c3d5f..6b3a32caa8 100644
--- a/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet10_0.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet10_0.verified.txt
@@ -78,16 +78,16 @@ file static class TUnitInfrastructure
{
try
{
- global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Loading assembly containing: global::TUnit.Core.SourceGenerator.Tests.AotConverterGeneratorTests");
+ global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Loading assembly containing: global::TUnit.Core.SourceGenerator.Tests.FullProjectGenerationTests");
}
catch { /* TUnit.Core not available - skip logging */ }
- var type_2 = typeof(global::TUnit.Core.SourceGenerator.Tests.AotConverterGeneratorTests);
+ var type_2 = typeof(global::TUnit.Core.SourceGenerator.Tests.FullProjectGenerationTests);
// Force module initializer to complete before proceeding
// RunClassConstructor triggers static constructor, which can only run AFTER module initializer completes
global::System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(type_2.TypeHandle);
try
{
- global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Assembly initialized: global::TUnit.Core.SourceGenerator.Tests.AotConverterGeneratorTests");
+ global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Assembly initialized: global::TUnit.Core.SourceGenerator.Tests.FullProjectGenerationTests");
}
catch { /* TUnit.Core not available - skip logging */ }
}
@@ -95,7 +95,7 @@ file static class TUnitInfrastructure
{
try
{
- global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Failed to load global::TUnit.Core.SourceGenerator.Tests.AotConverterGeneratorTests: " + ex.Message);
+ global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Failed to load global::TUnit.Core.SourceGenerator.Tests.FullProjectGenerationTests: " + ex.Message);
}
catch { /* TUnit.Core not available - skip logging */ }
}
diff --git a/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet8_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet8_0.verified.txt
index e0a05c3d5f..6b3a32caa8 100644
--- a/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet8_0.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet8_0.verified.txt
@@ -78,16 +78,16 @@ file static class TUnitInfrastructure
{
try
{
- global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Loading assembly containing: global::TUnit.Core.SourceGenerator.Tests.AotConverterGeneratorTests");
+ global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Loading assembly containing: global::TUnit.Core.SourceGenerator.Tests.FullProjectGenerationTests");
}
catch { /* TUnit.Core not available - skip logging */ }
- var type_2 = typeof(global::TUnit.Core.SourceGenerator.Tests.AotConverterGeneratorTests);
+ var type_2 = typeof(global::TUnit.Core.SourceGenerator.Tests.FullProjectGenerationTests);
// Force module initializer to complete before proceeding
// RunClassConstructor triggers static constructor, which can only run AFTER module initializer completes
global::System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(type_2.TypeHandle);
try
{
- global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Assembly initialized: global::TUnit.Core.SourceGenerator.Tests.AotConverterGeneratorTests");
+ global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Assembly initialized: global::TUnit.Core.SourceGenerator.Tests.FullProjectGenerationTests");
}
catch { /* TUnit.Core not available - skip logging */ }
}
@@ -95,7 +95,7 @@ file static class TUnitInfrastructure
{
try
{
- global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Failed to load global::TUnit.Core.SourceGenerator.Tests.AotConverterGeneratorTests: " + ex.Message);
+ global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Failed to load global::TUnit.Core.SourceGenerator.Tests.FullProjectGenerationTests: " + ex.Message);
}
catch { /* TUnit.Core not available - skip logging */ }
}
diff --git a/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet9_0.verified.txt b/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet9_0.verified.txt
index e0a05c3d5f..6b3a32caa8 100644
--- a/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet9_0.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.DotNet9_0.verified.txt
@@ -78,16 +78,16 @@ file static class TUnitInfrastructure
{
try
{
- global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Loading assembly containing: global::TUnit.Core.SourceGenerator.Tests.AotConverterGeneratorTests");
+ global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Loading assembly containing: global::TUnit.Core.SourceGenerator.Tests.FullProjectGenerationTests");
}
catch { /* TUnit.Core not available - skip logging */ }
- var type_2 = typeof(global::TUnit.Core.SourceGenerator.Tests.AotConverterGeneratorTests);
+ var type_2 = typeof(global::TUnit.Core.SourceGenerator.Tests.FullProjectGenerationTests);
// Force module initializer to complete before proceeding
// RunClassConstructor triggers static constructor, which can only run AFTER module initializer completes
global::System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(type_2.TypeHandle);
try
{
- global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Assembly initialized: global::TUnit.Core.SourceGenerator.Tests.AotConverterGeneratorTests");
+ global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Assembly initialized: global::TUnit.Core.SourceGenerator.Tests.FullProjectGenerationTests");
}
catch { /* TUnit.Core not available - skip logging */ }
}
@@ -95,7 +95,7 @@ file static class TUnitInfrastructure
{
try
{
- global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Failed to load global::TUnit.Core.SourceGenerator.Tests.AotConverterGeneratorTests: " + ex.Message);
+ global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Failed to load global::TUnit.Core.SourceGenerator.Tests.FullProjectGenerationTests: " + ex.Message);
}
catch { /* TUnit.Core not available - skip logging */ }
}
diff --git a/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.Net4_7.verified.txt b/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.Net4_7.verified.txt
index e03a68e441..6b3a32caa8 100644
--- a/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.Net4_7.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/DuplicateTypeNameAcrossAssembliesTests.InfrastructureGenerator_WithDuplicateTypeNames_CompilesSuccessfully.Net4_7.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
using TUnit.Core.Logging;
@@ -78,16 +78,16 @@ file static class TUnitInfrastructure
{
try
{
- global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Loading assembly containing: global::TUnit.Core.SourceGenerator.Tests.AotConverterGeneratorTests");
+ global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Loading assembly containing: global::TUnit.Core.SourceGenerator.Tests.FullProjectGenerationTests");
}
catch { /* TUnit.Core not available - skip logging */ }
- var type_2 = typeof(global::TUnit.Core.SourceGenerator.Tests.AotConverterGeneratorTests);
+ var type_2 = typeof(global::TUnit.Core.SourceGenerator.Tests.FullProjectGenerationTests);
// Force module initializer to complete before proceeding
// RunClassConstructor triggers static constructor, which can only run AFTER module initializer completes
global::System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(type_2.TypeHandle);
try
{
- global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Assembly initialized: global::TUnit.Core.SourceGenerator.Tests.AotConverterGeneratorTests");
+ global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Assembly initialized: global::TUnit.Core.SourceGenerator.Tests.FullProjectGenerationTests");
}
catch { /* TUnit.Core not available - skip logging */ }
}
@@ -95,7 +95,7 @@ file static class TUnitInfrastructure
{
try
{
- global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Failed to load global::TUnit.Core.SourceGenerator.Tests.AotConverterGeneratorTests: " + ex.Message);
+ global::TUnit.Core.GlobalContext.Current.GlobalLogger.LogTrace("[ModuleInitializer:TestsBase`1] Failed to load global::TUnit.Core.SourceGenerator.Tests.FullProjectGenerationTests: " + ex.Message);
}
catch { /* TUnit.Core not available - skip logging */ }
}
diff --git a/TUnit.Core.SourceGenerator.Tests/EnumMemberNamesTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/EnumMemberNamesTests.Test.verified.txt
index fcbb6a38cd..2366ceb79e 100644
--- a/TUnit.Core.SourceGenerator.Tests/EnumMemberNamesTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/EnumMemberNamesTests.Test.verified.txt
@@ -39,7 +39,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(string), "value", new
{
case 1:
{
- instance.SomeTest(global::TUnit.Core.Helpers.CastHelper.Cast(args[0]));
+ instance.SomeTest((string)args[0]);
return default(global::System.Threading.Tasks.ValueTask);
}
default:
diff --git a/TUnit.Core.SourceGenerator.Tests/ExpectedArgumentTypeTests.Test.verified.txt b/TUnit.Core.SourceGenerator.Tests/ExpectedArgumentTypeTests.Test.verified.txt
index 3b0d288124..c43348edb4 100644
--- a/TUnit.Core.SourceGenerator.Tests/ExpectedArgumentTypeTests.Test.verified.txt
+++ b/TUnit.Core.SourceGenerator.Tests/ExpectedArgumentTypeTests.Test.verified.txt
@@ -1,4 +1,4 @@
-//
+//
#pragma warning disable
#nullable enable
@@ -46,7 +46,7 @@ global::TUnit.Core.ParameterMetadataFactory.Create(typeof(global::System.Type),
{
case 2:
{
- return new global::System.Threading.Tasks.ValueTask(instance.TypedArguments(global::TUnit.Core.Helpers.CastHelper.Cast