You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Injected properties don't get their event receivers executed #6554
It is stated here in the documentation that one of the things that the ITest*Receiver interface implementations are picked up from are "Injected properties", which makes perfect sense.
Notice how SomeResource.OnTestStart and SomeResource.OnTestEnd never run (open the Test.cs file at the root of the repo to see the actual source code)
TUnit Version
1.63.0
.NET Version
.NET 10
Operating System
Linux
IDE / Test Runner
dotnet CLI (dotnet test / dotnet run)
Error Output / Stack Trace
failed Test (18ms)
TUnit.Engine.Exceptions.TestFailedException: [Test Failure] AssertionException: Expected to be true
but found False
at Assert.That(SomeResource.DidOnTestStartRun).IsTrue()
at Test.MyTests.Test() in Test.cs:13
--- TUnit internals omitted (run with --detailed-stacktrace for full trace) ---
Standard output
Initializing...
Disposing...
Additional Context
No response
IDE-Specific Issue?
I've confirmed this issue occurs when running via dotnet test or dotnet run, not just in my IDE
Activity
fix: run event receivers on injected properties (thomhurst#6556)