Problem Statement
I've found these nuisances when using the TUnit analyzer to migrate from TUnit.
These are the conversions I've found missing:
| NUnit |
Expected in TUnit |
| Assert.That(boolean); |
await Assert.That(boolean).IsTrue(); |
| TestContext.WriteLine(string); |
Console.WriteLine(string); |
| TestContext.Out.WriteLine(string); |
Console.Out.WriteLine(string); |
| TestContext.CurrentContext.TestDirectory |
System.AppContext.BaseDirectory |
| TestContext.CurrentContext.WorkDirectory |
System.AppContext.BaseDirectory |
| TestContext.AddTestAttachment(string filePath) |
TestContext.Current!.Output.AttachArtifact(string filePath) |
notice that some TestContext.* NUnit methods are shortcuts for TestContext.CurrentContext.*
Proposed Solution
Please, include these use cases in the analyzer
Alternatives Considered
No response
Feature Category
Test Discovery / Attributes
How important is this feature to you?
None
Additional Context
No response
Contribution
Problem Statement
I've found these nuisances when using the TUnit analyzer to migrate from TUnit.
These are the conversions I've found missing:
notice that some
TestContext.*NUnit methods are shortcuts forTestContext.CurrentContext.*Proposed Solution
Please, include these use cases in the analyzer
Alternatives Considered
No response
Feature Category
Test Discovery / Attributes
How important is this feature to you?
None
Additional Context
No response
Contribution