Description
Well, I'm not sure if it's a bug or a feature request or kind of both.
I'm migrating from NUnit and there are a few tests that accept DateTime as a parameter. NUnit could handle this case by converting the passed string parameter into the respective DateTime, but TUnit seems to be stricter about parameter types.
As such, I can't use the following pattern:
[Test]
[Arguments("2022-5-31")]
[Arguments("2022-6-1")]
public void MyTest(DateTime testDate)
...
Is my only option here a MethodDataSource?
Expected Behavior
To be able to use struct types as arguments
Actual Behavior
TUnit0001: Attribute argument types 'string' don't match method parameter types 'System.DateTime'
Steps to Reproduce
See description
TUnit Version
1.19.74
.NET Version
.NET 10.0
Operating System
Windows
IDE / Test Runner
dotnet CLI (dotnet test / dotnet run)
Error Output / Stack Trace
Additional Context
No response
IDE-Specific Issue?
Description
Well, I'm not sure if it's a bug or a feature request or kind of both.
I'm migrating from NUnit and there are a few tests that accept
DateTimeas a parameter. NUnit could handle this case by converting the passed string parameter into the respectiveDateTime, but TUnit seems to be stricter about parameter types.As such, I can't use the following pattern:
Is my only option here a
MethodDataSource?Expected Behavior
To be able to use struct types as arguments
Actual Behavior
TUnit0001: Attribute argument types 'string' don't match method parameter types 'System.DateTime'
Steps to Reproduce
See description
TUnit Version
1.19.74
.NET Version
.NET 10.0
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