Open
Description
When upgrading both TUnit
(v0.18.26
→ v0.18.33
) and Verify.TUnit
(v28.15.0
→ v28.16.0
),
the following issue arises for tests using the UseParameters()
method in conjunction with a [ModuleInitializer]
that changes the directory for snapshots using UseProjectRelativeDirectory()
:
ArgumentNullException: Value cannot be null. (Parameter 'path1')
at System.ArgumentNullException.Throw(String paramName)
at System.IO.Path.Combine(String path1, String path2)
at VerifyTUnit.Verifier.<>c__DisplayClass3_0.<UseProjectRelativeDirectory>b__0(String sourceFile, String projectDirectory, Type type, MethodInfo method) in /_/src/Verify.TUnit/DerivePaths/Verifier.cs:line 29
at VerifyTUnit.Verifier.GetPathInfo(String sourceFile, Type type, MethodInfo method) in /_/src/Verify.TUnit/DerivePaths/Verifier.cs:line 11
at VerifyTUnit.Verifier.BuildVerifier(String sourceFile, VerifySettings settings, Boolean useUniqueDirectory) in /_/src/Verify.TUnit/Verifier.cs:line 46
at VerifyTUnit.Verifier.<>c__DisplayClass8_0.<<Verify>b__0>d.MoveNext() in /_/src/Verify.TUnit/Verifier.cs:line 67
A reproducible example can be found in this repo on the project-directory-null branch.
Metadata
Metadata
Assignees
Labels
No labels