We have several places where we use [TestCase] to create a single test with multiple input values. While efficient (no code duplication), this is not the best of user experiences as it makes it harder to run a single test and also doesn't really allow us to mark the various input values with a descriptive text. It also doesn't align with how canonical data for exercises is defined, which only works on single test cases.
Consider the isogram exercises's tests:
[TestCase("duplicates", ExpectedResult = true)]
[TestCase("eleven", ExpectedResult = false, Ignore = "Remove to run test case")]
[TestCase("subdermatoglyphic", ExpectedResult = true, Ignore = "Remove to run test case")]
[TestCase("Alphabet", ExpectedResult = false, Ignore = "Remove to run test case")]
[TestCase("thumbscrew-japingly", ExpectedResult = true, Ignore = "Remove to run test case")]
[TestCase("Hjelmqvist-Gryb-Zock-Pfund-Wax", ExpectedResult = true, Ignore = "Remove to run test case")]
[TestCase("Heizölrückstoßabdämpfung", ExpectedResult = true, Ignore = "Remove to run test case")]
[TestCase("the quick brown fox", ExpectedResult = false, Ignore = "Remove to run test case")]
[TestCase("Emily Jung Schwartzkopf", ExpectedResult = true, Ignore = "Remove to run test case")]
[TestCase("éléphant", ExpectedResult = false, Ignore = "Remove to run test case")]
public bool Isogram_correctly_detects_isograms(string input)
{
return Isogram.IsIsogram(input);
}
What's the difference between test case one and two? It's not immediately obvious. The canonical-data of this exercise looks much nicer. I think we should convert the [TestCase] tests to individual tests.
We have several places where we use
[TestCase]to create a single test with multiple input values. While efficient (no code duplication), this is not the best of user experiences as it makes it harder to run a single test and also doesn't really allow us to mark the various input values with a descriptive text. It also doesn't align with how canonical data for exercises is defined, which only works on single test cases.Consider the
isogramexercises's tests:What's the difference between test case one and two? It's not immediately obvious. The canonical-data of this exercise looks much nicer. I think we should convert the [TestCase] tests to individual tests.