Closed StefH closed 1 hour ago
Is this there a way to inject the TestContext in the [Test] instead of [Before(Test)]?
You can grab it statically: TestContext.Current
2 conflicts in SelfRegisteredExtensions?
Yeah this happens if you use the TUnit package in a library project, and reference that in your test project.
The plan is for library projects to reference TUnit.Core
only - Similar to xUnit.abstractions
- But it's not ready yet. I'm going to try to get that working in the next week or so hopefully.
Does that solve everything for you for now @StefH ?
Yes. Thanks for the explanation. I'll close this now.
Maybe tag me here once the refactoring related to TUnit.Core is done.
1 TUnitLogger Context?
I want to redirect my own logger to the TUnitLogger instance.
This is the class:
Which is used like:
Question: Is this there a way to inject the TestContext in the [Test] instead of [Before(Test)]?
2 conflicts in SelfRegisteredExtensions?
I've created a new project
WireMock.Net.TUnit.csproj
which includes the TUnit NuGet. And I've a test-projecttest\WireMock.Net.TUnitTests.csproj
which also includes the TUnit NuGet.When building I get the warning:
Is this defined behavior?
Note that xUnit has a NuGet xUnit.abstractions which includes the ITestOutputHelper which is similar to TUnitLogger.