Loading...
Loading...
Get best practices for TUnit unit testing, including data-driven tests
npx skill4agent add github/awesome-copilot csharp-tunit[ProjectName].TestsCalculatorTestsCalculatordotnet test[Test][Fact]MethodName_Scenario_ExpectedBehavior[Before(Test)][After(Test)][Before(Class)][After(Class)][Before(Assembly)][After(Assembly)][Before(TestSession)][After(TestSession)]await Assert.That()[DependsOn][Arguments][InlineData][MethodData][MemberData][ClassData]ITestDataSource[Arguments]await Assert.That(value).IsEqualTo(expected)await Assert.That(value).IsSameReferenceAs(expected)await Assert.That(value).IsTrue()await Assert.That(value).IsFalse()await Assert.That(collection).Contains(item)await Assert.That(collection).DoesNotContain(item)await Assert.That(value).Matches(pattern)await Assert.That(action).Throws<TException>()await Assert.That(asyncAction).ThrowsAsync<TException>().Andawait Assert.That(value).IsNotNull().And.IsEqualTo(expected).Orawait Assert.That(value).IsEqualTo(1).Or.IsEqualTo(2).Within(tolerance)[Repeat(n)][Retry(n)][ParallelLimit<T>][Skip("reason")][DependsOn(nameof(OtherTest))][Timeout(milliseconds)][Category("CategoryName")][DisplayName("Custom Test Name")]TestContext[WindowsOnly][NotInParallel][ParallelLimit<T>][Repeat(n)][ParallelLimit<T>][Fact][Test][Theory][Test][Arguments][InlineData][Arguments][MemberData][MethodData]Assert.Equalawait Assert.That(actual).IsEqualTo(expected)Assert.Trueawait Assert.That(condition).IsTrue()Assert.Throws<T>await Assert.That(action).Throws<T>()[Before(Test)][After(Test)]IClassFixture<T>[Before(Class)][After(Class)]