Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify.TUnit: Method not found #1754

Closed
ThorstenSauter opened this issue Feb 3, 2025 · 2 comments
Closed

Verify.TUnit: Method not found #1754

ThorstenSauter opened this issue Feb 3, 2025 · 2 comments

Comments

@ThorstenSauter
Copy link

ThorstenSauter commented Feb 3, 2025

When using TUnit v0.10.6 (and starting with v0.10.1) with Verify.TUnit v28.9.0, tests fail with the error Method not found: 'System.Type TUnit.Core.TestDetails.get_ClassType()'.

Example stack trace:

Method not found: 'System.Type TUnit.Core.TestDetails.get_ClassType()'.
   at VerifyTUnit.Verifier.BuildVerifier(String sourceFile, VerifySettings settings, Boolean useUniqueDirectory)
   at VerifyTUnit.Verifier.<>c__DisplayClass8_0.<<Verify>b__0>d.MoveNext() in /_/src/Verify.TUnit/Verifier.cs:line 67
--- End of stack trace from previous location ---
   at TUnit.VerifyBug.Tests.RandomTest() in D:\dev\TUnit.VerifyBug\tests\TUnit.VerifyBug\Tests.cs:line 13
   at TUnit.Core.AsyncConvert.Convert(Func`1 action)
   at TUnit.Core.DiscoveredTest`1.ExecuteTest(CancellationToken cancellationToken)
   at TUnit.Engine.Helpers.Timings.Record(String name, TestContext context, Func`1 action)
   at TUnit.Engine.Services.TestInvoker.Invoke(DiscoveredTest discoveredTest, CancellationToken cancellationToken, List`1 cleanupExceptions)
   at TUnit.Engine.Services.TestInvoker.Invoke(DiscoveredTest discoveredTest, CancellationToken cancellationToken, List`1 cleanupExceptions)
   at TUnit.Engine.Services.SingleTestExecutor.ExecuteTestMethodWithTimeout(DiscoveredTest discoveredTest, CancellationToken cancellationToken, List`1 cleanupExceptions)
   at TUnit.Engine.Services.SingleTestExecutor.ExecuteWithCancellationTokens(DiscoveredTest discoveredTest, List`1 cleanupExceptions)
   at TUnit.Engine.Services.SingleTestExecutor.ExecuteWithRetries(DiscoveredTest discoveredTest, List`1 cleanupExceptions)
   at TUnit.Engine.Services.SingleTestExecutor.ExecuteWithRetries(DiscoveredTest discoveredTest, List`1 cleanupExceptions)
   at TUnit.Engine.Services.SingleTestExecutor.ExecuteTestInternalAsync(DiscoveredTest test, ITestExecutionFilter filter, ExecuteRequestContext context, Boolean isStartedAsDependencyForAnotherTest)
   at TUnit.Engine.Services.SingleTestExecutor.ExecuteTestInternalAsync(DiscoveredTest test, ITestExecutionFilter filter, ExecuteRequestContext context, Boolean isStartedAsDependencyForAnotherTest)
   at TUnit.Engine.Services.SingleTestExecutor.ExecuteTestInternalAsync(DiscoveredTest test, ITestExecutionFilter filter, ExecuteRequestContext context, Boolean isStartedAsDependencyForAnotherTest)
   at TUnit.Engine.Services.SingleTestExecutor.ExecuteTestInternalAsync(DiscoveredTest test, ITestExecutionFilter filter, ExecuteRequestContext context, Boolean isStartedAsDependencyForAnotherTest)
   at TUnit.Engine.Services.TestsExecutor.ProcessTest(DiscoveredTest test, ITestExecutionFilter filter, ExecuteRequestContext context, CancellationToken cancellationToken)

I've created a minimal repository that reproduces the issue. I'm not certain whether this is an issue with TUnit or whether Verify will have to adjust.

Please let me know if you need any further information.

@thomhurst
Copy link
Owner

Will need a Verify update. I've raised a PR there: VerifyTests/Verify#1394

@thomhurst
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants