tracks/csharp/exercises/pig-latin/PigLatinTest.cs in trackler-2.0.8.14 vs tracks/csharp/exercises/pig-latin/PigLatinTest.cs in trackler-2.0.8.15

- old
+ new

@@ -1,88 +1,79 @@ -using NUnit.Framework; +using Xunit; -[TestFixture] public class PigLatinTest { - [TestCase("apple", ExpectedResult = "appleay")] - [TestCase("ear", ExpectedResult = "earay")] - [TestCase("igloo", ExpectedResult = "iglooay")] - [TestCase("object", ExpectedResult = "objectay")] - [TestCase("under", ExpectedResult = "underay")] - public string Ay_is_added_to_words_that_start_with_vowels(string word) + [Theory] + [InlineData("apple", "appleay")] + [InlineData("ear", "earay")] + [InlineData("igloo", "iglooay")] + [InlineData("object", "objectay")] + [InlineData("under", "underay")] + public void Ay_is_added_to_words_that_start_with_vowels(string word, string expected) { - return PigLatin.Translate(word); + Assert.Equal(expected, PigLatin.Translate(word)); } - [Ignore("Remove to run test")] - [TestCase("pig", ExpectedResult = "igpay")] - [TestCase("koala", ExpectedResult = "oalakay")] - [TestCase("yellow", ExpectedResult = "ellowyay")] - [TestCase("xenon", ExpectedResult = "enonxay")] - public string First_letter_and_ay_are_moved_to_the_end_of_words_that_start_with_consonants(string word) + [Theory(Skip = "Remove to run test")] + [InlineData("pig", "igpay")] + [InlineData("koala", "oalakay")] + [InlineData("yellow", "ellowyay")] + [InlineData("xenon", "enonxay")] + public void First_letter_and_ay_are_moved_to_the_end_of_words_that_start_with_consonants(string word, string expected) { - return PigLatin.Translate(word); + Assert.Equal(expected, PigLatin.Translate(word)); } - [Ignore("Remove to run test")] - [Test] + [Fact(Skip = "Remove to run test")] public void Ch_is_treated_like_a_single_consonant() { - Assert.That(PigLatin.Translate("chair"), Is.EqualTo("airchay")); + Assert.Equal("airchay", PigLatin.Translate("chair")); } - [Ignore("Remove to run test")] - [Test] + [Fact(Skip = "Remove to run test")] public void Qu_is_treated_like_a_single_consonant() { - Assert.That(PigLatin.Translate("queen"), Is.EqualTo("eenquay")); + Assert.Equal("eenquay", PigLatin.Translate("queen")); } - [Ignore("Remove to run test")] - [Test] + [Fact(Skip = "Remove to run test")] public void Qu_and_a_single_preceding_consonant_are_treated_like_a_single_consonant() { - Assert.That(PigLatin.Translate("square"), Is.EqualTo("aresquay")); + Assert.Equal("aresquay", PigLatin.Translate("square")); } - [Ignore("Remove to run test")] - [Test] + [Fact(Skip = "Remove to run test")] public void Th_is_treated_like_a_single_consonant() { - Assert.That(PigLatin.Translate("therapy"), Is.EqualTo("erapythay")); + Assert.Equal("erapythay", PigLatin.Translate("therapy")); } - [Ignore("Remove to run test")] - [Test] + [Fact(Skip = "Remove to run test")] public void Thr_is_treated_like_a_single_consonant() { - Assert.That(PigLatin.Translate("thrush"), Is.EqualTo("ushthray")); + Assert.Equal("ushthray", PigLatin.Translate("thrush")); } - [Ignore("Remove to run test")] - [Test] + [Fact(Skip = "Remove to run test")] public void Sch_is_treated_like_a_single_consonant() { - Assert.That(PigLatin.Translate("school"), Is.EqualTo("oolschay")); + Assert.Equal("oolschay", PigLatin.Translate("school")); } - [Ignore("Remove to run test")] - [Test] + [Fact(Skip = "Remove to run test")] public void Yt_is_treated_like_a_single_vowel() { - Assert.That(PigLatin.Translate("yttria"), Is.EqualTo("yttriaay")); + Assert.Equal("yttriaay", PigLatin.Translate("yttria")); } - [Ignore("Remove to run test")] - [Test] + [Fact(Skip = "Remove to run test")] public void Xr_is_treated_like_a_single_vowel() { - Assert.That(PigLatin.Translate("xray"), Is.EqualTo("xrayay")); + Assert.Equal("xrayay", PigLatin.Translate("xray")); } - [Ignore("Remove to run test")] - [Test] + [Fact(Skip = "Remove to run test")] public void Phrases_are_translated() { - Assert.That(PigLatin.Translate("quick fast run"), Is.EqualTo("ickquay astfay unray")); + Assert.Equal("ickquay astfay unray", PigLatin.Translate("quick fast run")); } } \ No newline at end of file