diff --git a/exercises/crypto-square/CryptoSquareTest.cs b/exercises/crypto-square/CryptoSquareTest.cs index 11db8fbfff..5c4a471920 100644 --- a/exercises/crypto-square/CryptoSquareTest.cs +++ b/exercises/crypto-square/CryptoSquareTest.cs @@ -1,98 +1,59 @@ -// This file was auto-generated based on version 2.0.0 of the canonical data. +// This file was auto-generated based on version 3.1.0 of the canonical data. using Xunit; public class CryptoSquareTest { [Fact] - public void Lowercase() - { - var plaintext = "Hello"; - var expected = "hello"; - Assert.Equal(expected, CryptoSquare.NormalizedPlaintext(plaintext)); - } - - [Fact(Skip = "Remove to run test")] - public void Remove_spaces() - { - var plaintext = "Hi there"; - var expected = "hithere"; - Assert.Equal(expected, CryptoSquare.NormalizedPlaintext(plaintext)); - } - - [Fact(Skip = "Remove to run test")] - public void Remove_punctuation() - { - var plaintext = "@1, 2%, 3 Go!"; - var expected = "123go"; - Assert.Equal(expected, CryptoSquare.NormalizedPlaintext(plaintext)); - } - - [Fact(Skip = "Remove to run test")] - public void Empty_plaintext_results_in_an_empty_rectangle() + public void Empty_plaintext_results_in_an_empty_ciphertext() { var plaintext = ""; - Assert.Empty(CryptoSquare.PlaintextSegments(plaintext)); - } - - [Fact(Skip = "Remove to run test")] - public void Number_4_character_plaintext_results_in_an_2x2_rectangle() - { - var plaintext = "Ab Cd"; - var expected = new[] { "ab", "cd" }; - Assert.Equal(expected, CryptoSquare.PlaintextSegments(plaintext)); - } - - [Fact(Skip = "Remove to run test")] - public void Number_9_character_plaintext_results_in_an_3x3_rectangle() - { - var plaintext = "This is fun!"; - var expected = new[] { "thi", "sis", "fun" }; - Assert.Equal(expected, CryptoSquare.PlaintextSegments(plaintext)); + var expected = ""; + Assert.Equal(expected, CryptoSquare.Ciphertext(plaintext)); } [Fact(Skip = "Remove to run test")] - public void Number_54_character_plaintext_results_in_an_8x7_rectangle() + public void Lowercase() { - var plaintext = "If man was meant to stay on the ground, god would have given us roots."; - var expected = new[] { "ifmanwas", "meanttos", "tayonthe", "groundgo", "dwouldha", "vegivenu", "sroots" }; - Assert.Equal(expected, CryptoSquare.PlaintextSegments(plaintext)); + var plaintext = "A"; + var expected = "a"; + Assert.Equal(expected, CryptoSquare.Ciphertext(plaintext)); } [Fact(Skip = "Remove to run test")] - public void Empty_plaintext_results_in_an_empty_encode() + public void Remove_spaces() { - var plaintext = ""; - var expected = ""; - Assert.Equal(expected, CryptoSquare.Encoded(plaintext)); + var plaintext = " b "; + var expected = "b"; + Assert.Equal(expected, CryptoSquare.Ciphertext(plaintext)); } [Fact(Skip = "Remove to run test")] - public void Non_empty_plaintext_results_in_the_combined_plaintext_segments() + public void Remove_punctuation() { - var plaintext = "If man was meant to stay on the ground, god would have given us roots."; - var expected = "imtgdvsfearwermayoogoanouuiontnnlvtwttddesaohghnsseoau"; - Assert.Equal(expected, CryptoSquare.Encoded(plaintext)); + var plaintext = "@1,%!"; + var expected = "1"; + Assert.Equal(expected, CryptoSquare.Ciphertext(plaintext)); } [Fact(Skip = "Remove to run test")] - public void Empty_plaintext_results_in_an_empty_ciphertext() + public void Number_9_character_plaintext_results_in_3_chunks_of_3_characters() { - var plaintext = ""; - var expected = ""; + var plaintext = "This is fun!"; + var expected = "tsf hiu isn"; Assert.Equal(expected, CryptoSquare.Ciphertext(plaintext)); } [Fact(Skip = "Remove to run test")] - public void Number_9_character_plaintext_results_in_3_chunks_of_3_characters() + public void Number_8_character_plaintext_results_in_3_chunks_the_last_one_with_a_trailing_space() { - var plaintext = "This is fun!"; - var expected = "tsf hiu isn"; + var plaintext = "Chill out."; + var expected = "clu hlt io "; Assert.Equal(expected, CryptoSquare.Ciphertext(plaintext)); } [Fact(Skip = "Remove to run test")] - public void Number_54_character_plaintext_results_in_7_chunks_the_last_two_padded_with_spaces() + public void Number_54_character_plaintext_results_in_7_chunks_the_last_two_with_trailing_spaces() { var plaintext = "If man was meant to stay on the ground, god would have given us roots."; var expected = "imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghn sseoau "; diff --git a/exercises/food-chain/Example.cs b/exercises/food-chain/Example.cs index 2a4717cd4f..1b9dd29090 100644 --- a/exercises/food-chain/Example.cs +++ b/exercises/food-chain/Example.cs @@ -36,9 +36,7 @@ public static class FoodChain "I don't know why she swallowed the fly. Perhaps she'll die." }; - public static string Verse(int number) => $"{VerseBegin(number)}\n{VerseEnd(number)}"; - - public static string Verse(int begin, int end) => string.Join("\n\n", Enumerable.Range(begin, end - begin + 1).Select(i => Verse(i))); + public static string Recite(int startVerse, int endVerse) => string.Join("\n\n", Enumerable.Range(startVerse, endVerse - startVerse + 1).Select(i => $"{VerseBegin(i)}\n{VerseEnd(i)}")); private static string VerseBegin(int number) { diff --git a/exercises/food-chain/FoodChain.cs b/exercises/food-chain/FoodChain.cs index cf94b008f5..d51ecf5c7d 100644 --- a/exercises/food-chain/FoodChain.cs +++ b/exercises/food-chain/FoodChain.cs @@ -2,12 +2,7 @@ public static class FoodChain { - public static string Verse(int number) - { - throw new NotImplementedException("You need to implement this function."); - } - - public static string Verse(int begin, int end) + public static string Recite(int startVerse, int endVerse) { throw new NotImplementedException("You need to implement this function."); } diff --git a/exercises/food-chain/FoodChainTest.cs b/exercises/food-chain/FoodChainTest.cs index 51ffbbf297..a2389d9527 100644 --- a/exercises/food-chain/FoodChainTest.cs +++ b/exercises/food-chain/FoodChainTest.cs @@ -1,4 +1,4 @@ -// This file was auto-generated based on version 1.0.0 of the canonical data. +// This file was auto-generated based on version 2.0.0 of the canonical data. using Xunit; @@ -10,7 +10,7 @@ public void Fly() var expected = "I know an old lady who swallowed a fly.\n" + "I don't know why she swallowed the fly. Perhaps she'll die."; - Assert.Equal(expected, FoodChain.Verse(1)); + Assert.Equal(expected, FoodChain.Recite(1, 1)); } [Fact(Skip = "Remove to run test")] @@ -21,7 +21,7 @@ public void Spider() "It wriggled and jiggled and tickled inside her.\n" + "She swallowed the spider to catch the fly.\n" + "I don't know why she swallowed the fly. Perhaps she'll die."; - Assert.Equal(expected, FoodChain.Verse(2)); + Assert.Equal(expected, FoodChain.Recite(2, 2)); } [Fact(Skip = "Remove to run test")] @@ -33,7 +33,7 @@ public void Bird() "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.\n" + "She swallowed the spider to catch the fly.\n" + "I don't know why she swallowed the fly. Perhaps she'll die."; - Assert.Equal(expected, FoodChain.Verse(3)); + Assert.Equal(expected, FoodChain.Recite(3, 3)); } [Fact(Skip = "Remove to run test")] @@ -46,7 +46,7 @@ public void Cat() "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.\n" + "She swallowed the spider to catch the fly.\n" + "I don't know why she swallowed the fly. Perhaps she'll die."; - Assert.Equal(expected, FoodChain.Verse(4)); + Assert.Equal(expected, FoodChain.Recite(4, 4)); } [Fact(Skip = "Remove to run test")] @@ -60,7 +60,7 @@ public void Dog() "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.\n" + "She swallowed the spider to catch the fly.\n" + "I don't know why she swallowed the fly. Perhaps she'll die."; - Assert.Equal(expected, FoodChain.Verse(5)); + Assert.Equal(expected, FoodChain.Recite(5, 5)); } [Fact(Skip = "Remove to run test")] @@ -75,7 +75,7 @@ public void Goat() "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.\n" + "She swallowed the spider to catch the fly.\n" + "I don't know why she swallowed the fly. Perhaps she'll die."; - Assert.Equal(expected, FoodChain.Verse(6)); + Assert.Equal(expected, FoodChain.Recite(6, 6)); } [Fact(Skip = "Remove to run test")] @@ -91,7 +91,7 @@ public void Cow() "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.\n" + "She swallowed the spider to catch the fly.\n" + "I don't know why she swallowed the fly. Perhaps she'll die."; - Assert.Equal(expected, FoodChain.Verse(7)); + Assert.Equal(expected, FoodChain.Recite(7, 7)); } [Fact(Skip = "Remove to run test")] @@ -100,7 +100,7 @@ public void Horse() var expected = "I know an old lady who swallowed a horse.\n" + "She's dead, of course!"; - Assert.Equal(expected, FoodChain.Verse(8)); + Assert.Equal(expected, FoodChain.Recite(8, 8)); } [Fact(Skip = "Remove to run test")] @@ -120,7 +120,7 @@ public void Multiple_verses() "She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her.\n" + "She swallowed the spider to catch the fly.\n" + "I don't know why she swallowed the fly. Perhaps she'll die."; - Assert.Equal(expected, FoodChain.Verse(1, 3)); + Assert.Equal(expected, FoodChain.Recite(1, 3)); } [Fact(Skip = "Remove to run test")] @@ -177,6 +177,6 @@ public void Full_song() "\n" + "I know an old lady who swallowed a horse.\n" + "She's dead, of course!"; - Assert.Equal(expected, FoodChain.Verse(1, 8)); + Assert.Equal(expected, FoodChain.Recite(1, 8)); } } \ No newline at end of file diff --git a/exercises/hamming/HammingTest.cs b/exercises/hamming/HammingTest.cs index e3e913c95a..dba450aebc 100644 --- a/exercises/hamming/HammingTest.cs +++ b/exercises/hamming/HammingTest.cs @@ -1,4 +1,4 @@ -// This file was auto-generated based on version 2.0.0 of the canonical data. +// This file was auto-generated based on version 2.0.1 of the canonical data. using Xunit; using System; @@ -56,13 +56,13 @@ public void Small_distance_in_long_strands() [Fact(Skip = "Remove to run test")] public void Non_unique_character_in_first_strand() { - Assert.Equal(1, Hamming.Distance("AGA", "AGG")); + Assert.Equal(1, Hamming.Distance("AAG", "AAA")); } [Fact(Skip = "Remove to run test")] public void Non_unique_character_in_second_strand() { - Assert.Equal(1, Hamming.Distance("AGG", "AGA")); + Assert.Equal(1, Hamming.Distance("AAA", "AAG")); } [Fact(Skip = "Remove to run test")] diff --git a/exercises/house/Example.cs b/exercises/house/Example.cs index 4ae782cdb8..8f831b9aae 100644 --- a/exercises/house/Example.cs +++ b/exercises/house/Example.cs @@ -34,13 +34,13 @@ public static class House "" }; - public static string Verses(int first, int last) + public static string Recite(int startVerse, int endVerse) { - var numberOfVerses = last - first + 1; - return string.Join("\n\n", Enumerable.Range(first, numberOfVerses).Select(Verse)); + var numberOfVerses = endVerse - startVerse + 1; + return string.Join("\n\n", Enumerable.Range(startVerse, numberOfVerses).Select(Verse)); } - public static string Verse(int number) + private static string Verse(int number) { return string.Join("\n", Enumerable.Range(1, number).Reverse().Select(index => Line(number, index))); } diff --git a/exercises/house/House.cs b/exercises/house/House.cs index 54e831afec..6cd41cd62e 100644 --- a/exercises/house/House.cs +++ b/exercises/house/House.cs @@ -2,12 +2,7 @@ public static class House { - public static string Verse(int number) - { - throw new NotImplementedException("You need to implement this function."); - } - - public static string Verses(int first, int last) + public static string Recite(int startVerse, int endVerse) { throw new NotImplementedException("You need to implement this function."); } diff --git a/exercises/house/HouseTest.cs b/exercises/house/HouseTest.cs index 7accfed8ee..ab9eb1ea96 100644 --- a/exercises/house/HouseTest.cs +++ b/exercises/house/HouseTest.cs @@ -1,4 +1,4 @@ -// This file was auto-generated based on version 1.0.0 of the canonical data. +// This file was auto-generated based on version 2.0.0 of the canonical data. using Xunit; @@ -8,7 +8,7 @@ public class HouseTest public void Verse_one_the_house_that_jack_built() { var expected = "This is the house that Jack built."; - Assert.Equal(expected, House.Verse(1)); + Assert.Equal(expected, House.Recite(1, 1)); } [Fact(Skip = "Remove to run test")] @@ -17,7 +17,7 @@ public void Verse_two_the_malt_that_lay() var expected = "This is the malt\n" + "that lay in the house that Jack built."; - Assert.Equal(expected, House.Verse(2)); + Assert.Equal(expected, House.Recite(2, 2)); } [Fact(Skip = "Remove to run test")] @@ -27,7 +27,7 @@ public void Verse_three_the_rat_that_ate() "This is the rat\n" + "that ate the malt\n" + "that lay in the house that Jack built."; - Assert.Equal(expected, House.Verse(3)); + Assert.Equal(expected, House.Recite(3, 3)); } [Fact(Skip = "Remove to run test")] @@ -38,7 +38,7 @@ public void Verse_four_the_cat_that_killed() "that killed the rat\n" + "that ate the malt\n" + "that lay in the house that Jack built."; - Assert.Equal(expected, House.Verse(4)); + Assert.Equal(expected, House.Recite(4, 4)); } [Fact(Skip = "Remove to run test")] @@ -50,7 +50,7 @@ public void Verse_five_the_dog_that_worried() "that killed the rat\n" + "that ate the malt\n" + "that lay in the house that Jack built."; - Assert.Equal(expected, House.Verse(5)); + Assert.Equal(expected, House.Recite(5, 5)); } [Fact(Skip = "Remove to run test")] @@ -63,7 +63,7 @@ public void Verse_six_the_cow_with_the_crumpled_horn() "that killed the rat\n" + "that ate the malt\n" + "that lay in the house that Jack built."; - Assert.Equal(expected, House.Verse(6)); + Assert.Equal(expected, House.Recite(6, 6)); } [Fact(Skip = "Remove to run test")] @@ -77,7 +77,7 @@ public void Verse_seven_the_maiden_all_forlorn() "that killed the rat\n" + "that ate the malt\n" + "that lay in the house that Jack built."; - Assert.Equal(expected, House.Verse(7)); + Assert.Equal(expected, House.Recite(7, 7)); } [Fact(Skip = "Remove to run test")] @@ -92,7 +92,7 @@ public void Verse_eight_the_man_all_tattered_and_torn() "that killed the rat\n" + "that ate the malt\n" + "that lay in the house that Jack built."; - Assert.Equal(expected, House.Verse(8)); + Assert.Equal(expected, House.Recite(8, 8)); } [Fact(Skip = "Remove to run test")] @@ -108,7 +108,7 @@ public void Verse_nine_the_priest_all_shaven_and_shorn() "that killed the rat\n" + "that ate the malt\n" + "that lay in the house that Jack built."; - Assert.Equal(expected, House.Verse(9)); + Assert.Equal(expected, House.Recite(9, 9)); } [Fact(Skip = "Remove to run test")] @@ -125,7 +125,7 @@ public void Verse_10_the_rooster_that_crowed_in_the_morn() "that killed the rat\n" + "that ate the malt\n" + "that lay in the house that Jack built."; - Assert.Equal(expected, House.Verse(10)); + Assert.Equal(expected, House.Recite(10, 10)); } [Fact(Skip = "Remove to run test")] @@ -143,7 +143,7 @@ public void Verse_11_the_farmer_sowing_his_corn() "that killed the rat\n" + "that ate the malt\n" + "that lay in the house that Jack built."; - Assert.Equal(expected, House.Verse(11)); + Assert.Equal(expected, House.Recite(11, 11)); } [Fact(Skip = "Remove to run test")] @@ -162,7 +162,7 @@ public void Verse_12_the_horse_and_the_hound_and_the_horn() "that killed the rat\n" + "that ate the malt\n" + "that lay in the house that Jack built."; - Assert.Equal(expected, House.Verse(12)); + Assert.Equal(expected, House.Recite(12, 12)); } [Fact(Skip = "Remove to run test")] @@ -203,7 +203,7 @@ public void Multiple_verses() "that killed the rat\n" + "that ate the malt\n" + "that lay in the house that Jack built."; - Assert.Equal(expected, House.Verses(4, 8)); + Assert.Equal(expected, House.Recite(4, 8)); } [Fact(Skip = "Remove to run test")] @@ -299,6 +299,6 @@ public void Full_rhyme() "that killed the rat\n" + "that ate the malt\n" + "that lay in the house that Jack built."; - Assert.Equal(expected, House.Verses(1, 12)); + Assert.Equal(expected, House.Recite(1, 12)); } } \ No newline at end of file diff --git a/exercises/isbn-verifier/IsbnVerifierTest.cs b/exercises/isbn-verifier/IsbnVerifierTest.cs index 931c4dbd69..9f3ab542b2 100644 --- a/exercises/isbn-verifier/IsbnVerifierTest.cs +++ b/exercises/isbn-verifier/IsbnVerifierTest.cs @@ -1,4 +1,4 @@ -// This file was auto-generated based on version 1.1.0 of the canonical data. +// This file was auto-generated based on version 2.0.0 of the canonical data. using Xunit; diff --git a/exercises/isogram/IsogramTest.cs b/exercises/isogram/IsogramTest.cs index cbb5143d51..d11baa30f3 100644 --- a/exercises/isogram/IsogramTest.cs +++ b/exercises/isogram/IsogramTest.cs @@ -1,4 +1,4 @@ -// This file was auto-generated based on version 1.1.0 of the canonical data. +// This file was auto-generated based on version 1.2.0 of the canonical data. using Xunit; @@ -41,9 +41,9 @@ public void Hypothetical_isogrammic_word_with_hyphen() } [Fact(Skip = "Remove to run test")] - public void Isogram_with_duplicated_non_letter_character() + public void Isogram_with_duplicated_hyphen() { - Assert.True(Isogram.IsIsogram("Hjelmqvist-Gryb-Zock-Pfund-Wax")); + Assert.True(Isogram.IsIsogram("six-year-old")); } [Fact(Skip = "Remove to run test")] diff --git a/exercises/kindergarten-garden/KindergartenGardenTest.cs b/exercises/kindergarten-garden/KindergartenGardenTest.cs index bbdae19510..550d98b042 100644 --- a/exercises/kindergarten-garden/KindergartenGardenTest.cs +++ b/exercises/kindergarten-garden/KindergartenGardenTest.cs @@ -66,32 +66,4 @@ public void Full_garden_last_students_garden() var sut = new KindergartenGarden("VRCGVVRVCGGCCGVRGCVCGCGV\nVRCCCGCRRGVCGCRVVCVGCGCV"); Assert.Equal(new[] { Plant.Grass, Plant.Violets, Plant.Clover, Plant.Violets }, sut.Plants("Larry")); } - - [Fact(Skip = "Remove to run test")] - public void Non_alphabetical_student_list_first_students_garden() - { - var sut = new KindergartenGarden("VCRRGVRG\nRVGCCGCV", new[] { "Samantha", "Patricia", "Xander", "Roger" }); - Assert.Equal(new[] { Plant.Violets, Plant.Clover, Plant.Radishes, Plant.Violets }, sut.Plants("Patricia")); - } - - [Fact(Skip = "Remove to run test")] - public void Non_alphabetical_student_list_second_students_garden() - { - var sut = new KindergartenGarden("VCRRGVRG\nRVGCCGCV", new[] { "Samantha", "Patricia", "Xander", "Roger" }); - Assert.Equal(new[] { Plant.Radishes, Plant.Radishes, Plant.Grass, Plant.Clover }, sut.Plants("Roger")); - } - - [Fact(Skip = "Remove to run test")] - public void Non_alphabetical_student_list_third_students_garden() - { - var sut = new KindergartenGarden("VCRRGVRG\nRVGCCGCV", new[] { "Samantha", "Patricia", "Xander", "Roger" }); - Assert.Equal(new[] { Plant.Grass, Plant.Violets, Plant.Clover, Plant.Grass }, sut.Plants("Samantha")); - } - - [Fact(Skip = "Remove to run test")] - public void Non_alphabetical_student_list_fourth_last_students_garden() - { - var sut = new KindergartenGarden("VCRRGVRG\nRVGCCGCV", new[] { "Samantha", "Patricia", "Xander", "Roger" }); - Assert.Equal(new[] { Plant.Radishes, Plant.Grass, Plant.Clover, Plant.Violets }, sut.Plants("Xander")); - } } \ No newline at end of file diff --git a/exercises/leap/LeapTest.cs b/exercises/leap/LeapTest.cs index e4676a3ad8..9eee13ae1a 100644 --- a/exercises/leap/LeapTest.cs +++ b/exercises/leap/LeapTest.cs @@ -1,4 +1,4 @@ -// This file was auto-generated based on version 1.0.0 of the canonical data. +// This file was auto-generated based on version 1.2.0 of the canonical data. using Xunit; @@ -13,7 +13,7 @@ public void Year_not_divisible_by_4_is_common_year() [Fact(Skip = "Remove to run test")] public void Year_divisible_by_4_not_divisible_by_100_is_leap_year() { - Assert.True(Leap.IsLeapYear(2016)); + Assert.True(Leap.IsLeapYear(1996)); } [Fact(Skip = "Remove to run test")] diff --git a/exercises/nucleotide-count/NucleotideCountTest.cs b/exercises/nucleotide-count/NucleotideCountTest.cs index 144c623bfd..d3e5fdf7d5 100644 --- a/exercises/nucleotide-count/NucleotideCountTest.cs +++ b/exercises/nucleotide-count/NucleotideCountTest.cs @@ -1,4 +1,4 @@ -// This file was auto-generated based on version 1.0.0 of the canonical data. +// This file was auto-generated based on version 1.2.0 of the canonical data. using Xunit; using System.Collections.Generic; @@ -19,6 +19,20 @@ public void Empty_strand() Assert.Equal(expected, sut.NucleotideCounts); } + [Fact(Skip = "Remove to run test")] + public void Can_count_one_nucleotide_in_single_character_input() + { + var sut = new NucleotideCount("G"); + var expected = new Dictionary + { + ['A'] = 0, + ['C'] = 0, + ['G'] = 1, + ['T'] = 0 + }; + Assert.Equal(expected, sut.NucleotideCounts); + } + [Fact(Skip = "Remove to run test")] public void Strand_with_repeated_nucleotide() { diff --git a/exercises/pangram/PangramTest.cs b/exercises/pangram/PangramTest.cs index 9dae335979..b91d71a6b7 100644 --- a/exercises/pangram/PangramTest.cs +++ b/exercises/pangram/PangramTest.cs @@ -1,4 +1,4 @@ -// This file was auto-generated based on version 1.1.0 of the canonical data. +// This file was auto-generated based on version 1.3.0 of the canonical data. using Xunit; @@ -10,6 +10,12 @@ public void Sentence_empty() Assert.False(Pangram.IsPangram("")); } + [Fact(Skip = "Remove to run test")] + public void Recognizes_a_perfect_lower_case_pangram() + { + Assert.True(Pangram.IsPangram("abcdefghijklmnopqrstuvwxyz")); + } + [Fact(Skip = "Remove to run test")] public void Pangram_with_only_lower_case() { @@ -23,9 +29,9 @@ public void Missing_character_x() } [Fact(Skip = "Remove to run test")] - public void Another_missing_character_x() + public void Another_missing_character_e_g_h() { - Assert.False(Pangram.IsPangram("the quick brown fish jumps over the lazy dog")); + Assert.False(Pangram.IsPangram("five boxing wizards jump quickly at it")); } [Fact(Skip = "Remove to run test")] diff --git a/exercises/pascals-triangle/PascalsTriangleTest.cs b/exercises/pascals-triangle/PascalsTriangleTest.cs index 684580ba77..3242ac8056 100644 --- a/exercises/pascals-triangle/PascalsTriangleTest.cs +++ b/exercises/pascals-triangle/PascalsTriangleTest.cs @@ -1,4 +1,4 @@ -// This file was auto-generated based on version 1.0.0 of the canonical data. +// This file was auto-generated based on version 1.2.0 of the canonical data. using Xunit; using System; @@ -39,6 +39,27 @@ public void Four_rows() Assert.Equal(expected, PascalsTriangle.Calculate(4)); } + [Fact(Skip = "Remove to run test")] + public void Five_rows() + { + var expected = new[] { new[] { 1 }, new[] { 1, 1 }, new[] { 1, 2, 1 }, new[] { 1, 3, 3, 1 }, new[] { 1, 4, 6, 4, 1 } }; + Assert.Equal(expected, PascalsTriangle.Calculate(5)); + } + + [Fact(Skip = "Remove to run test")] + public void Six_rows() + { + var expected = new[] { new[] { 1 }, new[] { 1, 1 }, new[] { 1, 2, 1 }, new[] { 1, 3, 3, 1 }, new[] { 1, 4, 6, 4, 1 }, new[] { 1, 5, 10, 10, 5, 1 } }; + Assert.Equal(expected, PascalsTriangle.Calculate(6)); + } + + [Fact(Skip = "Remove to run test")] + public void Ten_rows() + { + var expected = new[] { new[] { 1 }, new[] { 1, 1 }, new[] { 1, 2, 1 }, new[] { 1, 3, 3, 1 }, new[] { 1, 4, 6, 4, 1 }, new[] { 1, 5, 10, 10, 5, 1 }, new[] { 1, 6, 15, 20, 15, 6, 1 }, new[] { 1, 7, 21, 35, 35, 21, 7, 1 }, new[] { 1, 8, 28, 56, 70, 56, 28, 8, 1 }, new[] { 1, 9, 36, 84, 126, 126, 84, 36, 9, 1 } }; + Assert.Equal(expected, PascalsTriangle.Calculate(10)); + } + [Fact(Skip = "Remove to run test")] public void Negative_rows() { diff --git a/exercises/queen-attack/QueenAttackTest.cs b/exercises/queen-attack/QueenAttackTest.cs index 3e3ce4d3a2..12a28865d8 100644 --- a/exercises/queen-attack/QueenAttackTest.cs +++ b/exercises/queen-attack/QueenAttackTest.cs @@ -1,4 +1,4 @@ -// This file was auto-generated based on version 1.0.0 of the canonical data. +// This file was auto-generated based on version 2.0.0 of the canonical data. using Xunit; using System; @@ -12,25 +12,25 @@ public void Queen_with_a_valid_position_does_not_throw_exception() } [Fact(Skip = "Remove to run test")] - public void Queen_must_have_positive_rank() + public void Queen_must_have_positive_row() { Assert.Throws(() => QueenAttack.Create(-2, 2)); } [Fact(Skip = "Remove to run test")] - public void Queen_must_have_rank_on_board() + public void Queen_must_have_row_on_board() { Assert.Throws(() => QueenAttack.Create(8, 4)); } [Fact(Skip = "Remove to run test")] - public void Queen_must_have_positive_file() + public void Queen_must_have_positive_column() { Assert.Throws(() => QueenAttack.Create(2, -2)); } [Fact(Skip = "Remove to run test")] - public void Queen_must_have_file_on_board() + public void Queen_must_have_column_on_board() { Assert.Throws(() => QueenAttack.Create(4, 8)); } @@ -44,7 +44,7 @@ public void Can_not_attack() } [Fact(Skip = "Remove to run test")] - public void Can_attack_on_same_rank() + public void Can_attack_on_same_row() { var whiteQueen = QueenAttack.Create(2,4); var blackQueen = QueenAttack.Create(2,6); @@ -52,7 +52,7 @@ public void Can_attack_on_same_rank() } [Fact(Skip = "Remove to run test")] - public void Can_attack_on_same_file() + public void Can_attack_on_same_column() { var whiteQueen = QueenAttack.Create(4,5); var blackQueen = QueenAttack.Create(2,5); diff --git a/exercises/two-bucket/TwoBucketTest.cs b/exercises/two-bucket/TwoBucketTest.cs index 650f154bd2..bd2d4e8985 100644 --- a/exercises/two-bucket/TwoBucketTest.cs +++ b/exercises/two-bucket/TwoBucketTest.cs @@ -1,4 +1,4 @@ -// This file was auto-generated based on version 1.1.0 of the canonical data. +// This file was auto-generated based on version 1.2.0 of the canonical data. using Xunit; diff --git a/generators/Exercises/IsbnVerifier.cs b/generators/Exercises/IsbnVerifier.cs index a3e451c107..23f37e5c0c 100644 --- a/generators/Exercises/IsbnVerifier.cs +++ b/generators/Exercises/IsbnVerifier.cs @@ -4,12 +4,5 @@ namespace Generators.Exercises { public class IsbnVerifier : Exercise { - protected override void UpdateCanonicalData(CanonicalData canonicalData) - { - foreach (var canonicalDataCase in canonicalData.Cases) - { - canonicalDataCase.Property = "IsValid"; - } - } } }