While i was reading this codex i found this section:
Unfortunately, [TestCase] does not report the used parameters on a failed test. An alternative is to use Assert.* with a custom message:
This is no longer the case. Here is a simple demonstration:
Solution:
class A { }
Sample Tests:
using NUnit.Framework;
[TestFixture]
public static class CodexTest
{
[TestCase(0)]
[TestCase(1)]
public static void TestTestCase(int input)
{
Assert.That(0, Is.EqualTo(input));
}
}
Output:
Test Results:
CodexTest
TestTestCase
TestTestCase(0)
TestTestCase(1)
Test Failed
Expected: 1
But was: 0
Completed in 65.5410ms
Completed in 102.8990ms
Completed in 108.7030ms
Hey @PoLaKoSz, thanks for the heads up. Unfortunately, I'm no longer active
on Codewars and don't maintain this document anymore (see #41). But I will
happily merge a pull request :)
While i was reading this codex i found this section:
This is no longer the case. Here is a simple demonstration:
Solution:
Sample Tests:
Output: