We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Attributes can only take literal values as parameters.
Since MethodDataSourceAttribute.Factory is Func<T>, it cannot be specified. Since it cannot be used, it is not documented either.
MethodDataSourceAttribute.Factory
Func<T>
https://learn.microsoft.com/dotnet/csharp/language-reference/compiler-messages/parameter-argument-mismatch#arguments-for-attributes
This appears to be an LLM hallucination. #2600
Remove MethodDataSourceAttribute.Factory.
There is MethodDataSourceAttribute.Factory.
[MethodDataSource("Data", Factory = default)]
1.43.11
.NET 9
Windows
dotnet CLI (dotnet test / dotnet run)
No response
dotnet test
dotnet run
Description
Attributes can only take literal values as parameters.
Since
MethodDataSourceAttribute.FactoryisFunc<T>, it cannot be specified. Since it cannot be used, it is not documented either.https://learn.microsoft.com/dotnet/csharp/language-reference/compiler-messages/parameter-argument-mismatch#arguments-for-attributes
This appears to be an LLM hallucination. #2600
Expected Behavior
Remove
MethodDataSourceAttribute.Factory.Actual Behavior
There is
MethodDataSourceAttribute.Factory.Steps to Reproduce
TUnit Version
1.43.11
.NET Version
.NET 9
Operating System
Windows
IDE / Test Runner
dotnet CLI (dotnet test / dotnet run)
Error Output / Stack Trace
Additional Context
No response
IDE-Specific Issue?
dotnet testordotnet run, not just in my IDE