diff --git a/accumulate/AccumulateTest.cs b/accumulate/AccumulateTest.cs index 9df7ce7105..452c7452ac 100644 --- a/accumulate/AccumulateTest.cs +++ b/accumulate/AccumulateTest.cs @@ -12,14 +12,14 @@ public void Empty_accumulation_produces_empty_accumulation() Assert.That(new int[0].Accumulate(x => x * x), Is.EqualTo(new int[0])); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Accumulate_squares() { Assert.That(new[] { 1, 2, 3 }.Accumulate(x => x * x), Is.EqualTo(new[] { 1, 4, 9 })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Accumulate_upcases() { @@ -27,7 +27,7 @@ public void Accumulate_upcases() Is.EqualTo(new List { "HELLO", "WORLD" })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Accumulate_reversed_strings() { @@ -42,7 +42,7 @@ private static string Reverse(string value) return new string(array); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Accumulate_within_accumulate() { @@ -51,7 +51,7 @@ public void Accumulate_within_accumulate() Assert.That(actual, Is.EqualTo(new[] { "a1 a2 a3", "b1 b2 b3", "c1 c2 c3" })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Accumulate_is_lazy() { diff --git a/acronym/AcronymTest.cs b/acronym/AcronymTest.cs index 775d1bc4c0..2aa04a84e5 100644 --- a/acronym/AcronymTest.cs +++ b/acronym/AcronymTest.cs @@ -11,12 +11,12 @@ public void Empty_string_abbreviated_to_empty_string() Assert.That(Acronym.Abbreviate(string.Empty), Is.EqualTo(string.Empty)); } - [TestCase("Portable Network Graphics", Result = "PNG", Ignore = true)] - [TestCase("Ruby on Rails", Result = "ROR", Ignore = true)] - [TestCase("HyperText Markup Language", Result = "HTML", Ignore = true)] - [TestCase("First In, First Out", Result = "FIFO", Ignore = true)] - [TestCase("PHP: Hypertext Preprocessor", Result = "PHP", Ignore = true)] - [TestCase("Complementary metal-oxide semiconductor", Result = "CMOS", Ignore = true)] + [TestCase("Portable Network Graphics", ExpectedResult = "PNG", Ignore = "Remove to run test case")] + [TestCase("Ruby on Rails", ExpectedResult = "ROR", Ignore = "Remove to run test case")] + [TestCase("HyperText Markup Language", ExpectedResult = "HTML", Ignore = "Remove to run test case")] + [TestCase("First In, First Out", ExpectedResult = "FIFO", Ignore = "Remove to run test case")] + [TestCase("PHP: Hypertext Preprocessor", ExpectedResult = "PHP", Ignore = "Remove to run test case")] + [TestCase("Complementary metal-oxide semiconductor", ExpectedResult = "CMOS", Ignore = "Remove to run test case")] public string Phrase_abbreviated_to_acronym(string phrase) { return Acronym.Abbreviate(phrase); diff --git a/allergies/AllergiesTest.cs b/allergies/AllergiesTest.cs index 3b522da86d..98c3284e36 100644 --- a/allergies/AllergiesTest.cs +++ b/allergies/AllergiesTest.cs @@ -13,7 +13,7 @@ public void No_allergies_means_not_allergic() Assert.That(allergies.AllergicTo("strawberries"), Is.False); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Allergic_to_eggs() { @@ -21,7 +21,7 @@ public void Allergic_to_eggs() Assert.That(allergies.AllergicTo("eggs"), Is.True); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Allergic_to_eggs_in_addition_to_other_stuff() { @@ -31,7 +31,7 @@ public void Allergic_to_eggs_in_addition_to_other_stuff() Assert.That(allergies.AllergicTo("strawberries"), Is.False); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void No_allergies_at_all() { @@ -39,7 +39,7 @@ public void No_allergies_at_all() Assert.That(allergies.List(), Is.Empty); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Allergic_to_just_eggs() { @@ -47,7 +47,7 @@ public void Allergic_to_just_eggs() Assert.That(allergies.List(), Is.EqualTo(new List { "eggs" })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Allergic_to_just_peanuts() { @@ -55,7 +55,7 @@ public void Allergic_to_just_peanuts() Assert.That(allergies.List(), Is.EqualTo(new List { "peanuts" })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Allergic_to_eggs_and_peanuts() { @@ -63,7 +63,7 @@ public void Allergic_to_eggs_and_peanuts() Assert.That(allergies.List(), Is.EqualTo(new List { "eggs", "peanuts" })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Allergic_to_lots_of_stuff() { @@ -72,7 +72,7 @@ public void Allergic_to_lots_of_stuff() Is.EqualTo(new List { "strawberries", "tomatoes", "chocolate", "pollen", "cats" })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Allergic_to_everything() { @@ -91,7 +91,7 @@ public void Allergic_to_everything() })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Ignore_non_allergen_score_parts() { diff --git a/anagram/AnagramTest.cs b/anagram/AnagramTest.cs index e03abef1e6..b34dce32f7 100644 --- a/anagram/AnagramTest.cs +++ b/anagram/AnagramTest.cs @@ -12,7 +12,7 @@ public void No_matches() Assert.That(detector.Match(words), Is.EquivalentTo(results)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Detect_simple_anagram() { @@ -22,7 +22,7 @@ public void Detect_simple_anagram() Assert.That(detector.Match(words), Is.EquivalentTo(results)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Detect_multiple_anagrams() { @@ -32,7 +32,7 @@ public void Detect_multiple_anagrams() Assert.That(detector.Match(words), Is.EquivalentTo(results)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Does_not_confuse_different_duplicates() { @@ -42,7 +42,7 @@ public void Does_not_confuse_different_duplicates() Assert.That(detector.Match(words), Is.EquivalentTo(results)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Identical_word_is_not_anagram() { @@ -52,7 +52,7 @@ public void Identical_word_is_not_anagram() Assert.That(detector.Match(words), Is.EquivalentTo(results)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Eliminate_anagrams_with_same_checksum() { @@ -62,7 +62,7 @@ public void Eliminate_anagrams_with_same_checksum() Assert.That(detector.Match(words), Is.EquivalentTo(results)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Eliminate_anagram_subsets() { @@ -72,7 +72,7 @@ public void Eliminate_anagram_subsets() Assert.That(detector.Match(words), Is.EquivalentTo(results)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Detect_anagrams() { @@ -82,7 +82,7 @@ public void Detect_anagrams() Assert.That(detector.Match(words), Is.EquivalentTo(results)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Anagrams_are_case_insensitive() { diff --git a/atbash-cipher/AtbashTest.cs b/atbash-cipher/AtbashTest.cs index 7e97ed8fd1..f1dfcf442d 100644 --- a/atbash-cipher/AtbashTest.cs +++ b/atbash-cipher/AtbashTest.cs @@ -4,13 +4,13 @@ public class AtbashTest { // change Ignore to false to run test case or just remove 'Ignore = true' - [TestCase("no", Result = "ml")] - [TestCase("yes", Result = "bvh", Ignore = true)] - [TestCase("OMG", Result = "lnt", Ignore = true)] - [TestCase("mindblowingly", Result = "nrmwy oldrm tob", Ignore = true)] - [TestCase("Testing, 1 2 3, testing.", Result = "gvhgr mt123 gvhgr mt", Ignore = true)] - [TestCase("Truth is fiction.", Result = "gifgs rhurx grlm", Ignore = true)] - [TestCase("The quick brown fox jumps over the lazy dog.", Result = "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt", Ignore = true)] + [TestCase("no", ExpectedResult = "ml")] + [TestCase("yes", ExpectedResult = "bvh", Ignore = "Remove to run test case")] + [TestCase("OMG", ExpectedResult = "lnt", Ignore = "Remove to run test case")] + [TestCase("mindblowingly", ExpectedResult = "nrmwy oldrm tob", Ignore = "Remove to run test case")] + [TestCase("Testing, 1 2 3, testing.", ExpectedResult = "gvhgr mt123 gvhgr mt", Ignore = "Remove to run test case")] + [TestCase("Truth is fiction.", ExpectedResult = "gifgs rhurx grlm", Ignore = "Remove to run test case")] + [TestCase("The quick brown fox jumps over the lazy dog.", ExpectedResult = "gsvjf rxpyi ldmul cqfnk hlevi gsvoz abwlt", Ignore = "Remove to run test case")] public string Encodes_words_using_atbash_cipher(string words) { return Atbash.Encode(words); diff --git a/binary/BinaryTest.cs b/binary/BinaryTest.cs index ab30b607a5..c216c93674 100644 --- a/binary/BinaryTest.cs +++ b/binary/BinaryTest.cs @@ -4,30 +4,30 @@ public class BinaryTest { // change Ignore to false to run test case or just remove 'Ignore = true' - [TestCase("1", Result = 1)] - [TestCase("10", Result = 2, Ignore = true)] - [TestCase("11", Result = 3, Ignore = true)] - [TestCase("100", Result = 4, Ignore = true)] - [TestCase("1001", Result = 9, Ignore = true)] - [TestCase("11010", Result = 26, Ignore = true)] - [TestCase("10001101000", Result = 1128, Ignore = true)] + [TestCase("1", ExpectedResult = 1)] + [TestCase("10", ExpectedResult = 2, Ignore = "Remove to run test case")] + [TestCase("11", ExpectedResult = 3, Ignore = "Remove to run test case")] + [TestCase("100", ExpectedResult = 4, Ignore = "Remove to run test case")] + [TestCase("1001", ExpectedResult = 9, Ignore = "Remove to run test case")] + [TestCase("11010", ExpectedResult = 26, Ignore = "Remove to run test case")] + [TestCase("10001101000", ExpectedResult = 1128, Ignore = "Remove to run test case")] public int Binary_converts_to_decimal(string binary) { return Binary.ToDecimal(binary); } - [TestCase("carrot", Ignore = true)] - [TestCase("2", Ignore = true)] - [TestCase("5", Ignore = true)] - [TestCase("9", Ignore = true)] - [TestCase("134678", Ignore = true)] - [TestCase("abc10z", Ignore = true)] + [TestCase("carrot", Ignore = "Remove to run test case")] + [TestCase("2", Ignore = "Remove to run test case")] + [TestCase("5", Ignore = "Remove to run test case")] + [TestCase("9", Ignore = "Remove to run test case")] + [TestCase("134678", Ignore = "Remove to run test case")] + [TestCase("abc10z", Ignore = "Remove to run test case")] public void Invalid_binary_is_decimal_0(string invalidValue) { Assert.That(Binary.ToDecimal(invalidValue), Is.EqualTo(0)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Binary_can_convert_formatted_strings() { diff --git a/bob/BobTest.cs b/bob/BobTest.cs index f3113ff58f..5a4a542d05 100644 --- a/bob/BobTest.cs +++ b/bob/BobTest.cs @@ -9,119 +9,119 @@ public void Stating_something () Assert.That(Bob.Hey("Tom-ay-to, tom-aaaah-to."), Is.EqualTo("Whatever.")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Shouting () { Assert.That(Bob.Hey("WATCH OUT!"), Is.EqualTo("Whoa, chill out!")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Asking_a_question () { Assert.That(Bob.Hey("Does this cryogenic chamber make me look fat?"), Is.EqualTo("Sure.")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Asking_a_question_with_a_trailing_space() { Assert.That(Bob.Hey("Do I like my spacebar too much? "), Is.EqualTo("Sure.")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Asking_a_numeric_question () { Assert.That(Bob.Hey("You are, what, like 15?"), Is.EqualTo("Sure.")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Talking_forcefully () { Assert.That(Bob.Hey("Let's go make out behind the gym!"), Is.EqualTo("Whatever.")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Using_acronyms_in_regular_search () { Assert.That(Bob.Hey("It's OK if you don't want to go to the DMV."), Is.EqualTo("Whatever.")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Forceful_questions () { Assert.That(Bob.Hey("WHAT THE HELL WERE YOU THINKING?"), Is.EqualTo("Whoa, chill out!")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Shouting_numbers () { Assert.That(Bob.Hey("1, 2, 3 GO!"), Is.EqualTo("Whoa, chill out!")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Only_numbers () { Assert.That(Bob.Hey("1, 2, 3"), Is.EqualTo("Whatever.")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Question_with_only_numbers () { Assert.That(Bob.Hey("4?"), Is.EqualTo("Sure.")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Shouting_with_special_characters () { Assert.That(Bob.Hey("ZOMG THE %^*@#$(*^ ZOMBIES ARE COMING!!11!!1!"), Is.EqualTo("Whoa, chill out!")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Shouting_with_no_exclamation_mark () { Assert.That(Bob.Hey("I HATE YOU"), Is.EqualTo("Whoa, chill out!")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Statement_containing_question_mark () { Assert.That(Bob.Hey("Ending with ? means a question."), Is.EqualTo("Whatever.")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Prattling_on () { Assert.That(Bob.Hey("Wait! Hang on. Are you going to be OK?"), Is.EqualTo("Sure.")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Silence () { Assert.That(Bob.Hey(""), Is.EqualTo("Fine. Be that way!")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Prolonged_silence () { Assert.That(Bob.Hey(" "), Is.EqualTo("Fine. Be that way!")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Multiple_line_question () { diff --git a/clock/ClockTest.cs b/clock/ClockTest.cs index 2fbce84a91..5267e7e84e 100644 --- a/clock/ClockTest.cs +++ b/clock/ClockTest.cs @@ -10,7 +10,7 @@ public void Prints_the_hour(int hours, string expected) Assert.That(new Clock(hours).ToString(), Is.EqualTo(expected)); } - [Ignore] + [Ignore("Remove to run test")] [TestCase(11, 9, "11:09")] [TestCase(11, 19, "11:19")] public void Prints_past_the_hour(int hours, int minutes, string expected) @@ -18,7 +18,7 @@ public void Prints_past_the_hour(int hours, int minutes, string expected) Assert.That(new Clock(hours, minutes).ToString(), Is.EqualTo(expected)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Can_add_minutes() { @@ -26,7 +26,7 @@ public void Can_add_minutes() Assert.That(clock.ToString(), Is.EqualTo("10:03")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Can_add_over_an_hour() { @@ -34,7 +34,7 @@ public void Can_add_over_an_hour() Assert.That(clock.ToString(), Is.EqualTo("11:03")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Can_subtract_minutes() { @@ -42,7 +42,7 @@ public void Can_subtract_minutes() Assert.That(clock.ToString(), Is.EqualTo("10:00")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Can_subtract_to_previous_hour() { @@ -50,7 +50,7 @@ public void Can_subtract_to_previous_hour() Assert.That(clock.ToString(), Is.EqualTo("09:33")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Can_subtract_over_an_hour() { @@ -58,7 +58,7 @@ public void Can_subtract_over_an_hour() Assert.That(clock.ToString(), Is.EqualTo("08:53")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Wraps_around_midnight() { @@ -66,7 +66,7 @@ public void Wraps_around_midnight() Assert.That(clock.ToString(), Is.EqualTo("00:01")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Wraps_around_midnight_backwards() { @@ -74,7 +74,7 @@ public void Wraps_around_midnight_backwards() Assert.That(clock.ToString(), Is.EqualTo("23:59")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Midnight_is_zero_hundred_hours() { @@ -82,7 +82,7 @@ public void Midnight_is_zero_hundred_hours() Assert.That(clock.ToString(), Is.EqualTo("00:00")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Sixty_minutes_is_next_hour() { @@ -90,7 +90,7 @@ public void Sixty_minutes_is_next_hour() Assert.That(clock.ToString(), Is.EqualTo("02:00")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Clocks_with_same_time_are_equal() { diff --git a/crypto-square/CryptoSquareTest.cs b/crypto-square/CryptoSquareTest.cs index 4506179d3d..3b4e673271 100644 --- a/crypto-square/CryptoSquareTest.cs +++ b/crypto-square/CryptoSquareTest.cs @@ -10,7 +10,7 @@ public void Strange_characters_are_stripped_during_normalization() Assert.That(crypto.NormalizePlaintext, Is.EqualTo("splunk")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Letters_are_lowercased_during_normalization() { @@ -18,7 +18,7 @@ public void Letters_are_lowercased_during_normalization() Assert.That(crypto.NormalizePlaintext, Is.EqualTo("whoahey")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Numbers_are_kept_during_normalization() { @@ -26,7 +26,7 @@ public void Numbers_are_kept_during_normalization() Assert.That(crypto.NormalizePlaintext, Is.EqualTo("123go")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Smallest_square_size_is_2() { @@ -34,7 +34,7 @@ public void Smallest_square_size_is_2() Assert.That(crypto.Size, Is.EqualTo(2)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Size_of_text_whose_length_is_a_perfect_square_is_its_square_root() { @@ -42,7 +42,7 @@ public void Size_of_text_whose_length_is_a_perfect_square_is_its_square_root() Assert.That(crypto.Size, Is.EqualTo(3)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Size_of_text_whose_length_is_not_a_perfect_square_is_next_biggest_square_root() { @@ -50,7 +50,7 @@ public void Size_of_text_whose_length_is_not_a_perfect_square_is_next_biggest_sq Assert.That(crypto.Size, Is.EqualTo(4)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Size_is_determined_by_normalized_text() { @@ -58,7 +58,7 @@ public void Size_is_determined_by_normalized_text() Assert.That(crypto.Size, Is.EqualTo(4)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Segments_are_split_by_square_size() { @@ -66,7 +66,7 @@ public void Segments_are_split_by_square_size() Assert.That(crypto.PlaintextSegments(), Is.EqualTo(new[] { "neverv", "exthin", "eheart", "withid", "lewoes" })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Segments_are_split_by_square_size_until_text_runs_out() { @@ -74,7 +74,7 @@ public void Segments_are_split_by_square_size_until_text_runs_out() Assert.That(crypto.PlaintextSegments(), Is.EqualTo(new[] { "zomg", "zomb", "ies" })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Ciphertext_combines_text_by_column() { @@ -82,7 +82,7 @@ public void Ciphertext_combines_text_by_column() Assert.That(crypto.Ciphertext(), Is.EqualTo("foeewhilpmrervrticseohtottbeedshlnte")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Ciphertext_skips_cells_with_no_text() { @@ -90,7 +90,7 @@ public void Ciphertext_skips_cells_with_no_text() Assert.That(crypto.Ciphertext(), Is.EqualTo("tasneyinicdsmiohooelntuillibsuuml")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Normalized_ciphertext_is_split_by_height_of_square() { @@ -98,7 +98,7 @@ public void Normalized_ciphertext_is_split_by_height_of_square() Assert.That(crypto.NormalizeCiphertext(), Is.EqualTo("vrel aepe mset paoo irpo")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Normalized_ciphertext_not_exactly_divisible_by_5_spills_into_a_smaller_segment() { @@ -106,7 +106,7 @@ public void Normalized_ciphertext_not_exactly_divisible_by_5_spills_into_a_small Assert.That(crypto.NormalizeCiphertext(), Is.EqualTo("msemo aanin dninn dlaet ltshu i")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Normalized_ciphertext_is_split_into_segements_of_correct_size() { @@ -114,7 +114,7 @@ public void Normalized_ciphertext_is_split_into_segements_of_correct_size() Assert.That(crypto.NormalizeCiphertext(), Is.EqualTo("imtgdvs fearwer mayoogo anouuio ntnnlvt wttddes aohghns seoau")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Normalized_ciphertext_is_split_into_segements_of_correct_size_with_punctuation() { @@ -122,7 +122,7 @@ public void Normalized_ciphertext_is_split_into_segements_of_correct_size_with_p Assert.That(crypto.NormalizeCiphertext(), Is.EqualTo("hifei acedl veeol eddgo aatcu nyhht")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Normalized_ciphertext_is_split_into_segements_of_correct_size_when_just_less_than_full_square() { diff --git a/difference-of-squares/DifferenceOfSquaresTests.cs b/difference-of-squares/DifferenceOfSquaresTests.cs index 4977a617d4..ab62d7309e 100644 --- a/difference-of-squares/DifferenceOfSquaresTests.cs +++ b/difference-of-squares/DifferenceOfSquaresTests.cs @@ -10,70 +10,70 @@ public void Test_square_of_sums_to_5() Assert.That(new Squares(5).SquareOfSums(), Is.EqualTo(225)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_sum_of_squares_to_5() { Assert.That(new Squares(5).SumOfSquares(), Is.EqualTo(55)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_difference_of_sums_to_5() { Assert.That(new Squares(5).DifferenceOfSquares(), Is.EqualTo(170)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_square_of_sums_to_10() { Assert.That(new Squares(10).SquareOfSums(), Is.EqualTo(3025)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_sum_of_squares_to_10() { Assert.That(new Squares(10).SumOfSquares(), Is.EqualTo(385)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_difference_of_sums_to_10() { Assert.That(new Squares(10).DifferenceOfSquares(), Is.EqualTo(2640)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_square_of_sums_to_100() { Assert.That(new Squares(100).SquareOfSums(), Is.EqualTo(25502500)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_sum_of_squares_to_100() { Assert.That(new Squares(100).SumOfSquares(), Is.EqualTo(338350)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_difference_of_sums_to_100() { Assert.That(new Squares(100).DifferenceOfSquares(), Is.EqualTo(25164150)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_difference_of_sums_0() { Assert.That(new Squares(0).DifferenceOfSquares(), Is.EqualTo(0)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_negative_numbers_throw_argument_exception() { diff --git a/docs/INSTALLATION.md b/docs/INSTALLATION.md index 8133029991..1989d8e7ec 100644 --- a/docs/INSTALLATION.md +++ b/docs/INSTALLATION.md @@ -40,7 +40,7 @@ If you have a paid version of Visual Studio install the [NUnit Visual Studio Tes ![Test Explorer](/img/setup/visualstudio/TestExplorer.png) -If you are using Visual Studio Express, install [NUnit 2.6.3](http://www.nunit.org/) and run the tests from the command line (see below). +If you are using Visual Studio Express, install [NUnit 3.x](http://www.nunit.org/) and run the tests from the command line (see below). #### Create a New Visual Studio Project @@ -56,7 +56,7 @@ Once created, feel free to drag and drop the C# Exercism folders into the projec ![Drag and Drop Folders](http://x.exercism.io/v3/tracks/csharp/docs/img/dragDropFolders.png) -In order to compile, get the [NUnit](http://nunit.org/) assembly referenced for the unit tests. This can be done via [NuGet](http://www.nuget.org/) - a package manager for Visual Studio. The best packages is to get the base [NUnit]() and the [NUnit.Runners](https://www.nuget.org/packages/NUnit.Runners/) +In order to compile, get the [NUnit](http://nunit.org/) assembly referenced for the unit tests. This can be done via [NuGet](http://www.nuget.org/) - a package manager for Visual Studio. The best packages is to get the base [NUnit]() and the [NUnit.Console](https://www.nuget.org/packages/NUnit.Console/) package since it includes the assemblies needed and a GUI test runner. ![Nuget](http://x.exercism.io/v3/tracks/csharp/docs/img/nugetMenu.png) diff --git a/docs/TESTS.md b/docs/TESTS.md index c60367ec83..c51ff6bb27 100644 --- a/docs/TESTS.md +++ b/docs/TESTS.md @@ -1,13 +1,13 @@ ### Windows All tests have been ignored except the first one for you to work on. To continue, just remove the ```[Ignore]``` attribute on the test to start working on it. -Make sure [NUnit](http://nunit.org/?p=download) is installed, if not already installed from the setup from above. +Make sure [NUnit](http://nunit.org/?p=download) version 3.x is installed, if not already installed from the setup from above. This installation should include the NUnit-Gui executable. Run this and, after compiling, open the assembly from the Gui and you are able to run the tests. **Note:** You may need to include the nunit-framework.dll in the same directory as the source code you're compiling if you get an error saying it can't find the ```nunit.framework.dll```. -If you installed the NUnit runner through NuGet, the runner will be located in the ```\packages\NUnit.Runners(version number)\tools``` folder where your project is. +If you installed the NUnit runner through NuGet, the runner will be located in the ```\packages\NUnit.Console(version number)\tools``` folder where your project is. If you installed NUnit manually the runner will be in the ```Program Files (x86)\NUnit(version number)\bin``` folder. diff --git a/etl/ETLTest.cs b/etl/ETLTest.cs index b02a3b02b6..4426fe6eff 100644 --- a/etl/ETLTest.cs +++ b/etl/ETLTest.cs @@ -12,7 +12,7 @@ public void Transforms_one_value() Assert.That(ETL.Transform(old), Is.EqualTo(expected)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Transforms_multiple_values() { @@ -21,7 +21,7 @@ public void Transforms_multiple_values() Assert.That(ETL.Transform(old), Is.EqualTo(expected)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Transforms_multiple_keys() { @@ -30,7 +30,7 @@ public void Transforms_multiple_keys() Assert.That(ETL.Transform(old), Is.EqualTo(expected)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Transforms_a_full_dataset() { diff --git a/gigasecond/GigasecondTest.cs b/gigasecond/GigasecondTest.cs index faa3d0c6c1..e8ab02053d 100644 --- a/gigasecond/GigasecondTest.cs +++ b/gigasecond/GigasecondTest.cs @@ -12,7 +12,7 @@ public void First_date() } [Test] - [Ignore] + [Ignore("Remove to run test")] public void Another_date() { var date = Gigasecond.Date(new DateTime(1977, 6, 13, 0, 0, 0, DateTimeKind.Utc)); @@ -20,7 +20,7 @@ public void Another_date() } [Test] - [Ignore] + [Ignore("Remove to run test")] public void Yet_another_date() { var date = Gigasecond.Date(new DateTime(1959, 7, 19, 0, 0, 0, DateTimeKind.Utc)); diff --git a/grade-school/GradeSchoolTest.cs b/grade-school/GradeSchoolTest.cs index 99c310a1a5..e38e09ac48 100644 --- a/grade-school/GradeSchoolTest.cs +++ b/grade-school/GradeSchoolTest.cs @@ -18,7 +18,7 @@ public void New_school_has_an_empty_roster() Assert.That(school.Roster, Has.Count.EqualTo(0)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Adding_a_student_adds_them_to_the_roster_for_the_given_grade() { @@ -27,7 +27,7 @@ public void Adding_a_student_adds_them_to_the_roster_for_the_given_grade() Assert.That(school.Roster[2], Is.EqualTo(expected)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Adding_more_students_to_the_same_grade_adds_them_to_the_roster() { @@ -38,7 +38,7 @@ public void Adding_more_students_to_the_same_grade_adds_them_to_the_roster() Assert.That(school.Roster[2], Is.EqualTo(expected)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Adding_students_to_different_grades_adds_them_to_the_roster() { @@ -48,7 +48,7 @@ public void Adding_students_to_different_grades_adds_them_to_the_roster() Assert.That(school.Roster[7], Is.EqualTo(new List { "Logan" })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Grade_returns_the_students_in_that_grade_in_alphabetical_order() { @@ -59,14 +59,14 @@ public void Grade_returns_the_students_in_that_grade_in_alphabetical_order() Assert.That(school.Grade(5), Is.EqualTo(expected)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Grade_returns_an_empty_list_if_there_are_no_students_in_that_grade() { Assert.That(school.Grade(1), Is.EqualTo(new List())); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Student_names_in_each_grade_in_roster_are_sorted() { diff --git a/hamming/HammingTest.cs b/hamming/HammingTest.cs index 7e5ac46424..30551e5c69 100644 --- a/hamming/HammingTest.cs +++ b/hamming/HammingTest.cs @@ -9,35 +9,35 @@ public void No_difference_between_empty_strands() Assert.That(Hamming.Compute("",""), Is.EqualTo(0)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void No_difference_between_identical_strands() { Assert.That(Hamming.Compute("GGACTGA","GGACTGA"), Is.EqualTo(0)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Complete_hamming_distance_in_small_strand() { Assert.That(Hamming.Compute("ACT","GGA"), Is.EqualTo(3)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Hamming_distance_is_off_by_one_strand() { Assert.That(Hamming.Compute("GGACGGATTCTG","AGGACGGATTCT"), Is.EqualTo(9)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Smalling_hamming_distance_in_middle_somewhere() { Assert.That(Hamming.Compute("GGACG","GGTCG"), Is.EqualTo(1)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Larger_distance() { diff --git a/hexadecimal/HexadecimalTest.cs b/hexadecimal/HexadecimalTest.cs index 306eb08019..f0974ac97a 100644 --- a/hexadecimal/HexadecimalTest.cs +++ b/hexadecimal/HexadecimalTest.cs @@ -4,28 +4,28 @@ public class HexadecimalTest { // change Ignore to false to run test case or just remove 'Ignore = true' - [TestCase("1", Result = 1)] - [TestCase("c", Result = 12, Ignore = true)] - [TestCase("10", Result = 16, Ignore = true)] - [TestCase("af", Result = 175, Ignore = true)] - [TestCase("100", Result = 256, Ignore = true)] - [TestCase("19ace", Result = 105166, Ignore = true)] - [TestCase("19ace", Result = 105166, Ignore = true)] + [TestCase("1", ExpectedResult = 1)] + [TestCase("c", ExpectedResult = 12, Ignore = "Remove to run test case")] + [TestCase("10", ExpectedResult = 16, Ignore = "Remove to run test case")] + [TestCase("af", ExpectedResult = 175, Ignore = "Remove to run test case")] + [TestCase("100", ExpectedResult = 256, Ignore = "Remove to run test case")] + [TestCase("19ace", ExpectedResult = 105166, Ignore = "Remove to run test case")] + [TestCase("19ace", ExpectedResult = 105166, Ignore = "Remove to run test case")] public int Hexadecimal_converts_to_decimal(string hexadecimal) { return Hexadecimal.ToDecimal(hexadecimal); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Invalid_hexadecimal_is_decimal_0() { Assert.That(Hexadecimal.ToDecimal("carrot"), Is.EqualTo(0)); } - [TestCase("000000", Result = 0, Ignore = true)] - [TestCase("ffffff", Result = 16777215, Ignore = true)] - [TestCase("ffff00", Result = 16776960, Ignore = true)] + [TestCase("000000", ExpectedResult = 0, Ignore = "Remove to run test case")] + [TestCase("ffffff", ExpectedResult = 16777215, Ignore = "Remove to run test case")] + [TestCase("ffff00", ExpectedResult = 16776960, Ignore = "Remove to run test case")] public int Octal_can_convert_formatted_strings(string hexidecimal) { return Hexadecimal.ToDecimal(hexidecimal); diff --git a/largest-series-product/LargestSeriesProductTest.cs b/largest-series-product/LargestSeriesProductTest.cs index a231999132..cc48a77daf 100644 --- a/largest-series-product/LargestSeriesProductTest.cs +++ b/largest-series-product/LargestSeriesProductTest.cs @@ -10,21 +10,21 @@ public void Splits_out_digits() Assert.That(new LargestSeriesProduct("0123456789").Digits, Is.EqualTo(new[] { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Digits_maintain_order() { Assert.That(new LargestSeriesProduct("9876543210").Digits, Is.EqualTo(new[] { 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Digits_is_an_empty_array_for_empty_input() { Assert.That(new LargestSeriesProduct("").Digits, Is.Empty); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Slices_digits_by_limit_given() { @@ -32,7 +32,7 @@ public void Slices_digits_by_limit_given() Is.EqualTo(new[] { new[] { 0, 1 }, new[] { 1, 2 }, new[] { 2, 3 }, new[] { 3, 4 } })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Slices_are_as_long_as_the_limit_given() { @@ -40,7 +40,7 @@ public void Slices_are_as_long_as_the_limit_given() Is.EqualTo(new[] { new[] { 9, 8, 2 }, new[] { 8, 2, 3 }, new[] { 2, 3, 4 }, new[] { 3, 4, 7 } })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Cannot_slice_bigger_than_input() { @@ -48,22 +48,22 @@ public void Cannot_slice_bigger_than_input() Assert.That(ex.Message, Is.EqualTo("Slice size is too big")); } - [Ignore] - [TestCase("01234567890", 2, Result = 72)] - [TestCase("1027839564", 3, Result = 270)] + [Ignore("Remove to run test")] + [TestCase("01234567890", 2, ExpectedResult = 72)] + [TestCase("1027839564", 3, ExpectedResult = 270)] public int Gets_the_largest_product(string digits, int seriesLength) { return new LargestSeriesProduct(digits).GetLargestProduct(seriesLength); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Largest_product_works_for_small_numbers() { Assert.That(new LargestSeriesProduct("19").GetLargestProduct(2), Is.EqualTo(9)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Largest_product_works_for_large_numbers() { @@ -71,23 +71,23 @@ public void Largest_product_works_for_large_numbers() Assert.That(new LargestSeriesProduct(LARGE_NUMBER).GetLargestProduct(6), Is.EqualTo(23520)); } - [Ignore] - [TestCase("0000", 2, Result = 0)] - [TestCase("99099", 3, Result = 0)] + [Ignore("Remove to run test")] + [TestCase("0000", 2, ExpectedResult = 0)] + [TestCase("99099", 3, ExpectedResult = 0)] public int Largest_product_works_if_all_spans_contain_zero(string digits, int seriesLength) { return new LargestSeriesProduct(digits).GetLargestProduct(seriesLength); } - [Ignore] - [TestCase("", Result = 1)] - [TestCase("123", Result = 1)] + [Ignore("Remove to run test")] + [TestCase("", ExpectedResult = 1)] + [TestCase("123", ExpectedResult = 1)] public int Largest_product_for_empty_span_is_1(string digits) { return new LargestSeriesProduct(digits).GetLargestProduct(0); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Cannot_slice_empty_string_with_nonzero_span(string digits) { diff --git a/leap/LeapTest.cs b/leap/LeapTest.cs index 3356310e9a..255f4f02e1 100644 --- a/leap/LeapTest.cs +++ b/leap/LeapTest.cs @@ -9,21 +9,21 @@ public void Valid_leap_year() Assert.That(Year.IsLeap(1996), Is.True); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Invalid_leap_year() { Assert.That(Year.IsLeap(1997), Is.False); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Turn_of_the_20th_century_is_not_a_leap_year() { Assert.That(Year.IsLeap(1900), Is.False); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Turn_of_the_25th_century_is_a_leap_year() { diff --git a/linked-list/LinkedListTest.cs b/linked-list/LinkedListTest.cs index 09d9a987bb..135a47de27 100644 --- a/linked-list/LinkedListTest.cs +++ b/linked-list/LinkedListTest.cs @@ -20,7 +20,7 @@ public void Push_and_pop_are_first_in_last_out_order() Assert.That(deque.Pop(), Is.EqualTo(10)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Push_and_shift_are_first_in_first_out_order() { @@ -30,7 +30,7 @@ public void Push_and_shift_are_first_in_first_out_order() Assert.That(deque.Shift(), Is.EqualTo(20)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Unshift_and_shift_are_last_in_first_out_order() { @@ -40,7 +40,7 @@ public void Unshift_and_shift_are_last_in_first_out_order() Assert.That(deque.Shift(), Is.EqualTo(10)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Unshift_and_pop_are_last_in_last_out_order() { @@ -50,7 +50,7 @@ public void Unshift_and_pop_are_last_in_last_out_order() Assert.That(deque.Pop(), Is.EqualTo(20)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Push_and_pop_can_handle_multiple_values() { @@ -62,7 +62,7 @@ public void Push_and_pop_can_handle_multiple_values() Assert.That(deque.Pop(), Is.EqualTo(10)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Unshift_and_shift_can_handle_multiple_values() { @@ -74,7 +74,7 @@ public void Unshift_and_shift_can_handle_multiple_values() Assert.That(deque.Shift(), Is.EqualTo(10)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void All_methods_of_manipulating_the_deque_can_be_used_together() { diff --git a/luhn/LuhnTest.cs b/luhn/LuhnTest.cs index 6a31022f27..07821b58a7 100644 --- a/luhn/LuhnTest.cs +++ b/luhn/LuhnTest.cs @@ -9,51 +9,51 @@ public void Check_digit_is_the_rightmost_digit() Assert.That(new Luhn(34567).CheckDigit, Is.EqualTo(7)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Addends_doubles_every_other_number_from_the_right() { Assert.That(new Luhn(12121).Addends, Is.EqualTo(new[] { 1, 4, 1, 4, 1 })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Addends_subtracts_9_when_doubled_number_is_more_than_9() { Assert.That(new Luhn(8631).Addends, Is.EqualTo(new[] { 7, 6, 6, 1 })); } - [Ignore] - [TestCase(4913, Result = 22)] - [TestCase(201773, Result = 21)] + [Ignore("Remove to run test")] + [TestCase(4913, ExpectedResult = 22)] + [TestCase(201773, ExpectedResult = 21)] public int Checksum_adds_addends_together(int number) { return new Luhn(number).Checksum; } - [Ignore] - [TestCase(738, Result = false)] - [TestCase(8739567, Result = true)] + [Ignore("Remove to run test")] + [TestCase(738, ExpectedResult = false)] + [TestCase(8739567, ExpectedResult = true)] public bool Number_is_valid_when_checksum_mod_10_is_zero(int number) { return new Luhn(number).Valid; } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Luhn_can_create_simple_numbers_with_valid_check_digit() { Assert.That(Luhn.Create(123), Is.EqualTo(1230)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Luhn_can_create_larger_numbers_with_valid_check_digit() { Assert.That(Luhn.Create(873956), Is.EqualTo(8739567)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Luhn_can_create_huge_numbers_with_valid_check_digit() { diff --git a/meetup/MeetupTest.cs b/meetup/MeetupTest.cs index fd245ad231..0bbad6055a 100644 --- a/meetup/MeetupTest.cs +++ b/meetup/MeetupTest.cs @@ -4,83 +4,83 @@ [TestFixture] public class MeetupTest { - [TestCase(5, DayOfWeek.Monday, Result = "2013-5-13")] - [TestCase(3, DayOfWeek.Tuesday, Result = "2013-3-19")] - [TestCase(1, DayOfWeek.Wednesday, Result = "2013-1-16")] - [TestCase(5, DayOfWeek.Thursday, Result = "2013-5-16")] - [TestCase(4, DayOfWeek.Friday, Result = "2013-4-19")] - [TestCase(2, DayOfWeek.Saturday, Result = "2013-2-16")] - [TestCase(10, DayOfWeek.Sunday, Result = "2013-10-13")] + [TestCase(5, DayOfWeek.Monday, ExpectedResult = "2013-5-13")] + [TestCase(3, DayOfWeek.Tuesday, ExpectedResult = "2013-3-19")] + [TestCase(1, DayOfWeek.Wednesday, ExpectedResult = "2013-1-16")] + [TestCase(5, DayOfWeek.Thursday, ExpectedResult = "2013-5-16")] + [TestCase(4, DayOfWeek.Friday, ExpectedResult = "2013-4-19")] + [TestCase(2, DayOfWeek.Saturday, ExpectedResult = "2013-2-16")] + [TestCase(10, DayOfWeek.Sunday, ExpectedResult = "2013-10-13")] public string Finds_first_teenth_day_of_week_in_a_month(int month, DayOfWeek dayOfWeek) { DateTime day = new Meetup(month, 2013).Day(dayOfWeek, Schedule.Teenth); return day.ToString("yyyy-M-d"); } - [Ignore] - [TestCase(3, DayOfWeek.Monday, Result = "2013-3-4")] - [TestCase(5, DayOfWeek.Tuesday, Result = "2013-5-7")] - [TestCase(7, DayOfWeek.Wednesday, Result = "2013-7-3")] - [TestCase(9, DayOfWeek.Thursday, Result = "2013-9-5")] - [TestCase(11, DayOfWeek.Friday, Result = "2013-11-1")] - [TestCase(1, DayOfWeek.Saturday, Result = "2013-1-5")] - [TestCase(4, DayOfWeek.Sunday, Result = "2013-4-7")] + [Ignore("Remove to run test")] + [TestCase(3, DayOfWeek.Monday, ExpectedResult = "2013-3-4")] + [TestCase(5, DayOfWeek.Tuesday, ExpectedResult = "2013-5-7")] + [TestCase(7, DayOfWeek.Wednesday, ExpectedResult = "2013-7-3")] + [TestCase(9, DayOfWeek.Thursday, ExpectedResult = "2013-9-5")] + [TestCase(11, DayOfWeek.Friday, ExpectedResult = "2013-11-1")] + [TestCase(1, DayOfWeek.Saturday, ExpectedResult = "2013-1-5")] + [TestCase(4, DayOfWeek.Sunday, ExpectedResult = "2013-4-7")] public string Finds_first_day_of_week_in_a_month(int month, DayOfWeek dayOfWeek) { DateTime day = new Meetup(month, 2013).Day(dayOfWeek, Schedule.First); return day.ToString("yyyy-M-d"); } - [Ignore] - [TestCase(3, DayOfWeek.Monday, Result = "2013-3-11")] - [TestCase(5, DayOfWeek.Tuesday, Result = "2013-5-14")] - [TestCase(7, DayOfWeek.Wednesday, Result = "2013-7-10")] - [TestCase(9, DayOfWeek.Thursday, Result = "2013-9-12")] - [TestCase(12, DayOfWeek.Friday, Result = "2013-12-13")] - [TestCase(2, DayOfWeek.Saturday, Result = "2013-2-9")] - [TestCase(4, DayOfWeek.Sunday, Result = "2013-4-14")] + [Ignore("Remove to run test")] + [TestCase(3, DayOfWeek.Monday, ExpectedResult = "2013-3-11")] + [TestCase(5, DayOfWeek.Tuesday, ExpectedResult = "2013-5-14")] + [TestCase(7, DayOfWeek.Wednesday, ExpectedResult = "2013-7-10")] + [TestCase(9, DayOfWeek.Thursday, ExpectedResult = "2013-9-12")] + [TestCase(12, DayOfWeek.Friday, ExpectedResult = "2013-12-13")] + [TestCase(2, DayOfWeek.Saturday, ExpectedResult = "2013-2-9")] + [TestCase(4, DayOfWeek.Sunday, ExpectedResult = "2013-4-14")] public string Finds_second_day_of_week_in_a_month(int month, DayOfWeek dayOfWeek) { DateTime day = new Meetup(month, 2013).Day(dayOfWeek, Schedule.Second); return day.ToString("yyyy-M-d"); } - [Ignore] - [TestCase(3, DayOfWeek.Monday, Result = "2013-3-18")] - [TestCase(5, DayOfWeek.Tuesday, Result = "2013-5-21")] - [TestCase(7, DayOfWeek.Wednesday, Result = "2013-7-17")] - [TestCase(9, DayOfWeek.Thursday, Result = "2013-9-19")] - [TestCase(12, DayOfWeek.Friday, Result = "2013-12-20")] - [TestCase(2, DayOfWeek.Saturday, Result = "2013-2-16")] - [TestCase(4, DayOfWeek.Sunday, Result = "2013-4-21")] + [Ignore("Remove to run test")] + [TestCase(3, DayOfWeek.Monday, ExpectedResult = "2013-3-18")] + [TestCase(5, DayOfWeek.Tuesday, ExpectedResult = "2013-5-21")] + [TestCase(7, DayOfWeek.Wednesday, ExpectedResult = "2013-7-17")] + [TestCase(9, DayOfWeek.Thursday, ExpectedResult = "2013-9-19")] + [TestCase(12, DayOfWeek.Friday, ExpectedResult = "2013-12-20")] + [TestCase(2, DayOfWeek.Saturday, ExpectedResult = "2013-2-16")] + [TestCase(4, DayOfWeek.Sunday, ExpectedResult = "2013-4-21")] public string Finds_third_day_of_week_in_a_month(int month, DayOfWeek dayOfWeek) { DateTime day = new Meetup(month, 2013).Day(dayOfWeek, Schedule.Third); return day.ToString("yyyy-M-d"); } - [Ignore] - [TestCase(3, DayOfWeek.Monday, Result = "2013-3-25")] - [TestCase(5, DayOfWeek.Tuesday, Result = "2013-5-28")] - [TestCase(7, DayOfWeek.Wednesday, Result = "2013-7-24")] - [TestCase(9, DayOfWeek.Thursday, Result = "2013-9-26")] - [TestCase(12, DayOfWeek.Friday, Result = "2013-12-27")] - [TestCase(2, DayOfWeek.Saturday, Result = "2013-2-23")] - [TestCase(4, DayOfWeek.Sunday, Result = "2013-4-28")] + [Ignore("Remove to run test")] + [TestCase(3, DayOfWeek.Monday, ExpectedResult = "2013-3-25")] + [TestCase(5, DayOfWeek.Tuesday, ExpectedResult = "2013-5-28")] + [TestCase(7, DayOfWeek.Wednesday, ExpectedResult = "2013-7-24")] + [TestCase(9, DayOfWeek.Thursday, ExpectedResult = "2013-9-26")] + [TestCase(12, DayOfWeek.Friday, ExpectedResult = "2013-12-27")] + [TestCase(2, DayOfWeek.Saturday, ExpectedResult = "2013-2-23")] + [TestCase(4, DayOfWeek.Sunday, ExpectedResult = "2013-4-28")] public string Finds_fourth_day_of_week_in_a_month(int month, DayOfWeek dayOfWeek) { DateTime day = new Meetup(month, 2013).Day(dayOfWeek, Schedule.Fourth); return day.ToString("yyyy-M-d"); } - [Ignore] - [TestCase(3, DayOfWeek.Monday, Result = "2013-3-25")] - [TestCase(5, DayOfWeek.Tuesday, Result = "2013-5-28")] - [TestCase(7, DayOfWeek.Wednesday, Result = "2013-7-31")] - [TestCase(9, DayOfWeek.Thursday, Result = "2013-9-26")] - [TestCase(12, DayOfWeek.Friday, Result = "2013-12-27")] - [TestCase(2, DayOfWeek.Saturday, Result = "2013-2-23")] - [TestCase(3, DayOfWeek.Sunday, Result = "2013-3-31")] + [Ignore("Remove to run test")] + [TestCase(3, DayOfWeek.Monday, ExpectedResult = "2013-3-25")] + [TestCase(5, DayOfWeek.Tuesday, ExpectedResult = "2013-5-28")] + [TestCase(7, DayOfWeek.Wednesday, ExpectedResult = "2013-7-31")] + [TestCase(9, DayOfWeek.Thursday, ExpectedResult = "2013-9-26")] + [TestCase(12, DayOfWeek.Friday, ExpectedResult = "2013-12-27")] + [TestCase(2, DayOfWeek.Saturday, ExpectedResult = "2013-2-23")] + [TestCase(3, DayOfWeek.Sunday, ExpectedResult = "2013-3-31")] public string Finds_last_day_of_week_in_a_month(int month, DayOfWeek dayOfWeek) { DateTime day = new Meetup(month, 2013).Day(dayOfWeek, Schedule.Last); diff --git a/nucleotide-count/NucleotideCountTest.cs b/nucleotide-count/NucleotideCountTest.cs index 0648c76a6e..b66b6b953a 100644 --- a/nucleotide-count/NucleotideCountTest.cs +++ b/nucleotide-count/NucleotideCountTest.cs @@ -12,7 +12,7 @@ public void Has_no_nucleotides() Assert.That(dna.NucleotideCounts, Is.EqualTo(expected)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Has_no_adenosine() { @@ -20,7 +20,7 @@ public void Has_no_adenosine() Assert.That(dna.Count('A'), Is.EqualTo(0)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Repetitive_cytidine_gets_counts() { @@ -28,7 +28,7 @@ public void Repetitive_cytidine_gets_counts() Assert.That(dna.Count('C'), Is.EqualTo(5)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Repetitive_sequence_has_only_guanosine() { @@ -37,7 +37,7 @@ public void Repetitive_sequence_has_only_guanosine() Assert.That(dna.NucleotideCounts, Is.EqualTo(expected)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Counts_only_thymidine() { @@ -45,7 +45,7 @@ public void Counts_only_thymidine() Assert.That(dna.Count('T'), Is.EqualTo(1)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Counts_a_nucleotide_only_once() { @@ -54,7 +54,7 @@ public void Counts_a_nucleotide_only_once() Assert.That(dna.Count('T'), Is.EqualTo(2)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Validates_nucleotides() { @@ -62,7 +62,7 @@ public void Validates_nucleotides() Assert.Throws(() => dna.Count('X')); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Counts_all_nucleotides() { diff --git a/octal/OctalTest.cs b/octal/OctalTest.cs index 3c46944ccf..1832219e54 100644 --- a/octal/OctalTest.cs +++ b/octal/OctalTest.cs @@ -4,30 +4,30 @@ public class OctalTest { // change Ignore to false to run test case or just remove 'Ignore = true' - [TestCase("1", Result = 1)] - [TestCase("10", Result = 8, Ignore = true)] - [TestCase("17", Result = 15, Ignore = true)] - [TestCase("11", Result = 9, Ignore = true)] - [TestCase("130", Result = 88, Ignore = true)] - [TestCase("2047", Result = 1063, Ignore = true)] - [TestCase("7777", Result = 4095, Ignore = true)] - [TestCase("1234567", Result = 342391, Ignore = true)] + [TestCase("1", ExpectedResult = 1)] + [TestCase("10", ExpectedResult = 8, Ignore = "Remove to run test case")] + [TestCase("17", ExpectedResult = 15, Ignore = "Remove to run test case")] + [TestCase("11", ExpectedResult = 9, Ignore = "Remove to run test case")] + [TestCase("130", ExpectedResult = 88, Ignore = "Remove to run test case")] + [TestCase("2047", ExpectedResult = 1063, Ignore = "Remove to run test case")] + [TestCase("7777", ExpectedResult = 4095, Ignore = "Remove to run test case")] + [TestCase("1234567", ExpectedResult = 342391, Ignore = "Remove to run test case")] public int Octal_converts_to_decimal(string value) { return Octal.ToDecimal(value); } - [TestCase("carrot", Ignore = true)] - [TestCase("8", Ignore = true)] - [TestCase("9", Ignore = true)] - [TestCase("6789", Ignore = true)] - [TestCase("abc1z", Ignore = true)] + [TestCase("carrot", Ignore = "Remove to run test case")] + [TestCase("8", Ignore = "Remove to run test case")] + [TestCase("9", Ignore = "Remove to run test case")] + [TestCase("6789", Ignore = "Remove to run test case")] + [TestCase("abc1z", Ignore = "Remove to run test case")] public void Invalid_octal_is_decimal_0(string invalidValue) { Assert.That(Octal.ToDecimal(invalidValue), Is.EqualTo(0)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Octal_can_convert_formatted_strings() { diff --git a/phone-number/PhoneNumberTest.cs b/phone-number/PhoneNumberTest.cs index c9745ba926..0434d8f421 100644 --- a/phone-number/PhoneNumberTest.cs +++ b/phone-number/PhoneNumberTest.cs @@ -10,7 +10,7 @@ public void Cleans_parens_spaces_and_dashes() Assert.That(phone.Number, Is.EqualTo("1234567890")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Cleans_numbers_with_dots() { @@ -18,7 +18,7 @@ public void Cleans_numbers_with_dots() Assert.That(phone.Number, Is.EqualTo("1234567890")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Allows_us_country_code() { @@ -26,7 +26,7 @@ public void Allows_us_country_code() Assert.That(phone.Number, Is.EqualTo("1234567890")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Invalid_when_11_digits() { @@ -34,7 +34,7 @@ public void Invalid_when_11_digits() Assert.That(phone.Number, Is.EqualTo("0000000000")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Invalid_when_9_digits() { @@ -42,7 +42,7 @@ public void Invalid_when_9_digits() Assert.That(phone.Number, Is.EqualTo("0000000000")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Has_an_area_code() { @@ -50,7 +50,7 @@ public void Has_an_area_code() Assert.That(phone.AreaCode, Is.EqualTo("123")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Formats_a_number() { diff --git a/pig-latin/PigLatinTest.cs b/pig-latin/PigLatinTest.cs index 830788a8cd..6333818199 100644 --- a/pig-latin/PigLatinTest.cs +++ b/pig-latin/PigLatinTest.cs @@ -3,83 +3,83 @@ [TestFixture] public class PigLatinTest { - [TestCase("apple", Result = "appleay")] - [TestCase("ear", Result = "earay")] - [TestCase("igloo", Result = "iglooay")] - [TestCase("object", Result = "objectay")] - [TestCase("under", Result = "underay")] + [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) { return PigLatin.Translate(word); } - [Ignore] - [TestCase("pig", Result = "igpay")] - [TestCase("koala", Result = "oalakay")] - [TestCase("yellow", Result = "ellowyay")] - [TestCase("xenon", Result = "enonxay")] + [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) { return PigLatin.Translate(word); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Ch_is_treated_like_a_single_consonant() { Assert.That(PigLatin.Translate("chair"), Is.EqualTo("airchay")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Qu_is_treated_like_a_single_consonant() { Assert.That(PigLatin.Translate("queen"), Is.EqualTo("eenquay")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Qu_and_a_single_preceding_consonant_are_treated_like_a_single_consonant() { Assert.That(PigLatin.Translate("square"), Is.EqualTo("aresquay")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Th_is_treated_like_a_single_consonant() { Assert.That(PigLatin.Translate("therapy"), Is.EqualTo("erapythay")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Thr_is_treated_like_a_single_consonant() { Assert.That(PigLatin.Translate("thrush"), Is.EqualTo("ushthray")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Sch_is_treated_like_a_single_consonant() { Assert.That(PigLatin.Translate("school"), Is.EqualTo("oolschay")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Yt_is_treated_like_a_single_vowel() { Assert.That(PigLatin.Translate("yttria"), Is.EqualTo("yttriaay")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Xr_is_treated_like_a_single_vowel() { Assert.That(PigLatin.Translate("xray"), Is.EqualTo("xrayay")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Phrases_are_translated() { diff --git a/prime-factors/PrimeFactorsTest.cs b/prime-factors/PrimeFactorsTest.cs index 7395bfe9bd..720f859d84 100644 --- a/prime-factors/PrimeFactorsTest.cs +++ b/prime-factors/PrimeFactorsTest.cs @@ -9,70 +9,70 @@ public void Test_1() Assert.That(PrimeFactors.For(1), Is.EqualTo(new int[0])); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_2() { Assert.That(PrimeFactors.For(2), Is.EqualTo(new[] { 2 })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_3() { Assert.That(PrimeFactors.For(3), Is.EqualTo(new[] { 3 })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_4() { Assert.That(PrimeFactors.For(4), Is.EqualTo(new[] { 2, 2 })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_6() { Assert.That(PrimeFactors.For(6), Is.EqualTo(new[] { 2, 3 })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_8() { Assert.That(PrimeFactors.For(8), Is.EqualTo(new[] { 2, 2, 2 })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_9() { Assert.That(PrimeFactors.For(9), Is.EqualTo(new[] { 3, 3 })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_27() { Assert.That(PrimeFactors.For(27), Is.EqualTo(new[] { 3, 3, 3 })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_625() { Assert.That(PrimeFactors.For(625), Is.EqualTo(new[] { 5, 5, 5, 5 })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_901255() { Assert.That(PrimeFactors.For(901255), Is.EqualTo(new[] { 5, 17, 23, 461 })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_93819012551() { diff --git a/pythagorean-triplet/PythagoreanTripletTest.cs b/pythagorean-triplet/PythagoreanTripletTest.cs index 725198215f..8b3b363655 100644 --- a/pythagorean-triplet/PythagoreanTripletTest.cs +++ b/pythagorean-triplet/PythagoreanTripletTest.cs @@ -10,22 +10,22 @@ public void Calculates_the_sum() Assert.That(new Triplet(3, 4, 5).Sum(), Is.EqualTo(12)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Calculates_the_product() { Assert.That(new Triplet(3, 4, 5).Product(), Is.EqualTo(60)); } - [Ignore] - [TestCase(3, 4, 5, Result = true)] - [TestCase(5, 6, 7, Result = false)] + [Ignore("Remove to run test")] + [TestCase(3, 4, 5, ExpectedResult = true)] + [TestCase(5, 6, 7, ExpectedResult = false)] public bool Can_recognize_a_valid_pythagorean(int a, int b, int c) { return new Triplet(a, b, c).IsPythagorean(); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Can_make_triplets_up_to_10() { @@ -34,7 +34,7 @@ public void Can_make_triplets_up_to_10() Assert.That(products, Is.EqualTo(new[] { 60, 480 })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Can_make_triplets_from_11_to_20() { @@ -43,7 +43,7 @@ public void Can_make_triplets_from_11_to_20() Assert.That(products, Is.EqualTo(new[] { 3840 })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Can_make_triplets_filtered_on_sum() { diff --git a/raindrops/RaindropsTest.cs b/raindrops/RaindropsTest.cs index 87372eddc9..0a3f14c334 100644 --- a/raindrops/RaindropsTest.cs +++ b/raindrops/RaindropsTest.cs @@ -3,15 +3,15 @@ [TestFixture] public class RaindropsTest { - [TestCase(1, Result = "1")] - [TestCase(52, Result = "52")] - [TestCase(12121, Result = "12121")] + [TestCase(1, ExpectedResult = "1")] + [TestCase(52, ExpectedResult = "52")] + [TestCase(12121, ExpectedResult = "12121")] public string Non_primes_pass_through(int number) { return Raindrops.Convert(number); } - [Ignore] + [Ignore("Remove to run test")] [TestCase(3)] [TestCase(6)] [TestCase(9)] @@ -20,7 +20,7 @@ public void Numbers_containing_3_as_a_prime_factor_give_pling(int number) Assert.That(Raindrops.Convert(number), Is.EqualTo("Pling")); } - [Ignore] + [Ignore("Remove to run test")] [TestCase(5)] [TestCase(10)] [TestCase(25)] @@ -29,7 +29,7 @@ public void Numbers_containing_5_as_a_prime_factor_give_plang(int number) Assert.That(Raindrops.Convert(number), Is.EqualTo("Plang")); } - [Ignore] + [Ignore("Remove to run test")] [TestCase(7)] [TestCase(14)] [TestCase(49)] @@ -38,11 +38,11 @@ public void Numbers_containing_7_as_a_prime_factor_give_plong(int number) Assert.That(Raindrops.Convert(number), Is.EqualTo("Plong")); } - [Ignore] - [TestCase(15, Result = "PlingPlang")] - [TestCase(21, Result = "PlingPlong")] - [TestCase(35, Result = "PlangPlong")] - [TestCase(105, Result = "PlingPlangPlong")] + [Ignore("Remove to run test")] + [TestCase(15, ExpectedResult = "PlingPlang")] + [TestCase(21, ExpectedResult = "PlingPlong")] + [TestCase(35, ExpectedResult = "PlangPlong")] + [TestCase(105, ExpectedResult = "PlingPlangPlong")] public string Numbers_containing_multiple_prime_factors_give_all_results_concatenated(int number) { return Raindrops.Convert(number); diff --git a/rna-transcription/ComplementTest.cs b/rna-transcription/ComplementTest.cs index 982d3b109f..195631240b 100644 --- a/rna-transcription/ComplementTest.cs +++ b/rna-transcription/ComplementTest.cs @@ -9,63 +9,63 @@ public void Rna_complement_of_cytosine_is_guanine() Assert.That(Complement.OfDna("C"), Is.EqualTo("G")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Rna_complement_of_guanine_is_cytosine() { Assert.That(Complement.OfDna("G"), Is.EqualTo("C")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Rna_complement_of_thymine_is_adenine() { Assert.That(Complement.OfDna("T"), Is.EqualTo("A")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Rna_complement_of_adenine_is_uracil() { Assert.That(Complement.OfDna("A"), Is.EqualTo("U")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Rna_complement() { Assert.That(Complement.OfDna("ACGTGGTCTTAA"), Is.EqualTo("UGCACCAGAAUU")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Dna_complement_of_cytosine_is_guanine() { Assert.That(Complement.OfRna("C"), Is.EqualTo("G")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Dna_complement_of_guanine_is_cytosine() { Assert.That(Complement.OfRna("G"), Is.EqualTo("C")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Dna_complement_of_uracil_is_adenine() { Assert.That(Complement.OfRna("U"), Is.EqualTo("A")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Dna_complement_of_adenine_is_thymine() { Assert.That(Complement.OfRna("A"), Is.EqualTo("T")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Dna_complement() { diff --git a/robot-name/RobotNameTest.cs b/robot-name/RobotNameTest.cs index 35a3b212aa..9477a6583d 100644 --- a/robot-name/RobotNameTest.cs +++ b/robot-name/RobotNameTest.cs @@ -17,14 +17,14 @@ public void Robot_has_a_name() StringAssert.IsMatch(@"[A-Z]{2}\d{3}", robot.Name); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Name_is_the_same_each_time() { Assert.That(robot.Name, Is.EqualTo(robot.Name)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Different_robots_have_different_names() { @@ -32,7 +32,7 @@ public void Different_robots_have_different_names() Assert.That(robot.Name, Is.Not.EqualTo(robot2.Name)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Can_reset_the_name() { diff --git a/roman-numerals/RomanNumeralsTest.cs b/roman-numerals/RomanNumeralsTest.cs index 30b5dae480..add830fc14 100644 --- a/roman-numerals/RomanNumeralsTest.cs +++ b/roman-numerals/RomanNumeralsTest.cs @@ -6,25 +6,25 @@ public class RomanNumeralsTest // Change 'Ignore = true' to 'Ignore = false' to run a test case. // You can also just remove 'Ignore = true'. - [TestCase(0, Result = "")] - [TestCase(1, Result = "I", Ignore = true)] - [TestCase(2, Result = "II", Ignore = true)] - [TestCase(3, Result = "III", Ignore = true)] - [TestCase(4, Result = "IV", Ignore = true)] - [TestCase(5, Result = "V", Ignore = true)] - [TestCase(6, Result = "VI", Ignore = true)] - [TestCase(9, Result = "IX", Ignore = true)] - [TestCase(27, Result = "XXVII", Ignore = true)] - [TestCase(48, Result = "XLVIII", Ignore = true)] - [TestCase(59, Result = "LIX", Ignore = true)] - [TestCase(93, Result = "XCIII", Ignore = true)] - [TestCase(141, Result = "CXLI", Ignore = true)] - [TestCase(163, Result = "CLXIII", Ignore = true)] - [TestCase(402, Result = "CDII", Ignore = true)] - [TestCase(575, Result = "DLXXV", Ignore = true)] - [TestCase(911, Result = "CMXI", Ignore = true)] - [TestCase(1024, Result = "MXXIV", Ignore = true)] - [TestCase(3000, Result = "MMM", Ignore = true)] + [TestCase(0, ExpectedResult = "")] + [TestCase(1, ExpectedResult = "I", Ignore = "Remove to run test case")] + [TestCase(2, ExpectedResult = "II", Ignore = "Remove to run test case")] + [TestCase(3, ExpectedResult = "III", Ignore = "Remove to run test case")] + [TestCase(4, ExpectedResult = "IV", Ignore = "Remove to run test case")] + [TestCase(5, ExpectedResult = "V", Ignore = "Remove to run test case")] + [TestCase(6, ExpectedResult = "VI", Ignore = "Remove to run test case")] + [TestCase(9, ExpectedResult = "IX", Ignore = "Remove to run test case")] + [TestCase(27, ExpectedResult = "XXVII", Ignore = "Remove to run test case")] + [TestCase(48, ExpectedResult = "XLVIII", Ignore = "Remove to run test case")] + [TestCase(59, ExpectedResult = "LIX", Ignore = "Remove to run test case")] + [TestCase(93, ExpectedResult = "XCIII", Ignore = "Remove to run test case")] + [TestCase(141, ExpectedResult = "CXLI", Ignore = "Remove to run test case")] + [TestCase(163, ExpectedResult = "CLXIII", Ignore = "Remove to run test case")] + [TestCase(402, ExpectedResult = "CDII", Ignore = "Remove to run test case")] + [TestCase(575, ExpectedResult = "DLXXV", Ignore = "Remove to run test case")] + [TestCase(911, ExpectedResult = "CMXI", Ignore = "Remove to run test case")] + [TestCase(1024, ExpectedResult = "MXXIV", Ignore = "Remove to run test case")] + [TestCase(3000, ExpectedResult = "MMM", Ignore = "Remove to run test case")] public string Convert_roman_to_arabic_numerals(int arabicNumeral) { return arabicNumeral.ToRoman(); diff --git a/scrabble-score/ScrabbleScoreTest.cs b/scrabble-score/ScrabbleScoreTest.cs index ea417b2904..dbf207dffe 100644 --- a/scrabble-score/ScrabbleScoreTest.cs +++ b/scrabble-score/ScrabbleScoreTest.cs @@ -9,49 +9,49 @@ public void Empty_word_scores_zero() Assert.That(Scrabble.Score(""), Is.EqualTo(0)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Whitespace_scores_zero() { Assert.That(Scrabble.Score(" \t\n"), Is.EqualTo(0)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Null_scores_zero() { Assert.That(Scrabble.Score(null), Is.EqualTo(0)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Scores_very_short_word() { Assert.That(Scrabble.Score("a"), Is.EqualTo(1)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Scores_other_very_short_word() { Assert.That(Scrabble.Score("f"), Is.EqualTo(4)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Simple_word_scores_the_number_of_letters() { Assert.That(Scrabble.Score("street"), Is.EqualTo(6)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Complicated_word_scores_more() { Assert.That(Scrabble.Score("quirky"), Is.EqualTo(22)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Scores_are_case_insensitive() { diff --git a/secret-handshake/SecretHandshakeTests.cs b/secret-handshake/SecretHandshakeTests.cs index 9c5380b2c2..e05498664a 100644 --- a/secret-handshake/SecretHandshakeTests.cs +++ b/secret-handshake/SecretHandshakeTests.cs @@ -9,42 +9,42 @@ public void Test_1_handshake_to_wink() Assert.That(SecretHandshake.Commands(1), Is.EqualTo(new[] { "wink" })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_10_handshake_to_double_blink() { Assert.That(SecretHandshake.Commands(2), Is.EqualTo(new[] { "double blink" })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_100_handshake_to_close_your_eyes() { Assert.That(SecretHandshake.Commands(4), Is.EqualTo(new[] { "close your eyes" })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_1000_handshake_to_close_your_eyes() { Assert.That(SecretHandshake.Commands(8), Is.EqualTo(new[] { "jump" })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_handshake_11_to_wink_and_double_blink() { Assert.That(SecretHandshake.Commands(3), Is.EqualTo(new[] { "wink", "double blink" })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_handshake_10011_to_double_blink_and_wink() { Assert.That(SecretHandshake.Commands(19), Is.EqualTo(new[] { "double blink", "wink" })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Test_handshake_11111_to_all_commands_reversed() { diff --git a/series/SeriesTest.cs b/series/SeriesTest.cs index 34ef12909e..ba06103c96 100644 --- a/series/SeriesTest.cs +++ b/series/SeriesTest.cs @@ -22,7 +22,7 @@ public void Series_of_one_splits_to_one_digit(string input, int[][] result) new object[] { "37103", new[] { new[] { 3, 7 }, new[] { 7, 1 }, new[] { 1, 0 }, new[] { 0, 3 } } } }; - [Ignore] + [Ignore("Remove to run test")] [TestCaseSource("SliceTwoTestData")] public void Series_of_two_splits_to_two_digits(string input, int[][] result) { @@ -36,7 +36,7 @@ public void Series_of_two_splits_to_two_digits(string input, int[][] result) new object[] { "982347", new[] { new[] { 9, 8, 2 }, new[] { 8, 2, 3 }, new[] { 2, 3, 4 }, new[] { 3, 4, 7 } } } }; - [Ignore] + [Ignore("Remove to run test")] [TestCaseSource("SliceThreeTestData")] public void Series_of_three_splits_to_three_digits(string input, int[][] result) { @@ -49,7 +49,7 @@ public void Series_of_three_splits_to_three_digits(string input, int[][] result) new object[] { "91274", new[] { new[] { 9, 1, 2, 7 }, new[] { 1, 2, 7, 4 } } } }; - [Ignore] + [Ignore("Remove to run test")] [TestCaseSource("SliceFourTestData")] public void Series_of_four_splits_to_four_digits(string input, int[][] result) { @@ -62,14 +62,14 @@ public void Series_of_four_splits_to_four_digits(string input, int[][] result) new object[] { "81228", new[] { new[] { 8, 1, 2, 2, 8 } } } }; - [Ignore] + [Ignore("Remove to run test")] [TestCaseSource("SliceFiveTestData")] public void Series_of_five_splits_to_five_digits(string input, int[][] result) { Assert.That(new Series(input).Slices(5), Is.EqualTo(result)); } - [Ignore] + [Ignore("Remove to run test")] [TestCase("01234", 6)] [TestCase("01032987583", 19)] public void Slice_longer_than_input_is_not_allowed(string input, int slice) diff --git a/sieve/SieveTest.cs b/sieve/SieveTest.cs index 48eea00d12..8b24539c6f 100644 --- a/sieve/SieveTest.cs +++ b/sieve/SieveTest.cs @@ -9,14 +9,14 @@ public void Finds_first_prime() Assert.That(Sieve.Primes(2), Is.EqualTo(new[] { 2 })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Finds_primes_up_to_10() { Assert.That(Sieve.Primes(10), Is.EqualTo(new[] { 2, 3, 5, 7 })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Finds_primes_up_to_1000() { diff --git a/simple-cipher/SimpleCipherTest.cs b/simple-cipher/SimpleCipherTest.cs index 23393f4085..6afc801194 100644 --- a/simple-cipher/SimpleCipherTest.cs +++ b/simple-cipher/SimpleCipherTest.cs @@ -14,17 +14,17 @@ public void Setup() [Test] public void Cipher_key_is_made_of_letters() { - Assert.That(cipher.Key, Is.StringMatching("[a-z]+")); + Assert.That(cipher.Key, Does.Match("[a-z]+")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Default_cipher_key_is_100_characters() { Assert.That(cipher.Key, Has.Length.EqualTo(100)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Cipher_keys_are_randomly_generated() { @@ -34,21 +34,21 @@ public void Cipher_keys_are_randomly_generated() // Here we take advantage of the fact that plaintext of "aaa..." doesn't output // the key. This is a critical problem with shift ciphers, some characters // will always output the key verbatim. - [Ignore] + [Ignore("Remove to run test")] [Test] public void Cipher_can_encode() { Assert.That(cipher.Encode("aaaaaaaaaa"), Is.EqualTo(cipher.Key.Substring(0, 10))); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Cipher_can_decode() { Assert.That(cipher.Decode(cipher.Key.Substring(0, 10)), Is.EqualTo("aaaaaaaaaa")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Cipher_is_reversible() { @@ -60,35 +60,35 @@ public void Cipher_is_reversible() [TestFixture] public class IncorrectKeyCipherTest { - [Ignore] + [Ignore("Remove to run test")] [Test] public void Cipher_throws_with_an_all_caps_key() { Assert.That(() => new Cipher("ABCDEF"), Throws.ArgumentException); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Cipher_throws_with_any_caps_key() { Assert.That(() => new Cipher("abcdEFg"), Throws.ArgumentException); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Cipher_throws_with_numeric_key() { Assert.That(() => new Cipher("12345"), Throws.ArgumentException); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Cipher_throws_with_any_numeric_key() { Assert.That(() => new Cipher("abcd345ef"), Throws.ArgumentException); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Cipher_throws_with_empty_key() { @@ -102,35 +102,35 @@ public class SubstitutionCipherTest private const string KEY = "abcdefghij"; private Cipher cipher; - [Ignore] + [Ignore("Remove to run test")] [SetUp] public void Setup() { cipher = new Cipher(KEY); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Cipher_keeps_the_submitted_key() { Assert.That(cipher.Key, Is.EqualTo(KEY)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Cipher_can_encode_with_given_key() { Assert.That(cipher.Encode("aaaaaaaaaa"), Is.EqualTo("abcdefghij")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Cipher_can_decode_with_given_key() { Assert.That(cipher.Decode("abcdefghij"), Is.EqualTo("aaaaaaaaaa")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Cipher_is_reversible_given_key() { @@ -138,7 +138,7 @@ public void Cipher_is_reversible_given_key() Assert.That(cipher.Decode(cipher.Encode(PLAINTEXT)), Is.EqualTo(PLAINTEXT)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Cipher_can_double_shift_encode() { @@ -146,21 +146,21 @@ public void Cipher_can_double_shift_encode() Assert.That(new Cipher(PLAINTEXT).Encode(PLAINTEXT), Is.EqualTo("qayaeaagaciai")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Cipher_can_wrap_encode() { Assert.That(cipher.Encode("zzzzzzzzzz"), Is.EqualTo("zabcdefghi")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Cipher_can_encode_a_message_that_is_shorter_than_the_key() { Assert.That(cipher.Encode("aaaaa"), Is.EqualTo("abcde")); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Cipher_can_decode_a_message_that_is_shorter_than_the_key() { diff --git a/space-age/SpaceAgeTest.cs b/space-age/SpaceAgeTest.cs index 5c3257d83d..38b6f093b6 100644 --- a/space-age/SpaceAgeTest.cs +++ b/space-age/SpaceAgeTest.cs @@ -11,7 +11,7 @@ public void Age_in_seconds() Assert.That(age.Seconds, Is.EqualTo(1000000)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Age_on_earth() { @@ -19,7 +19,7 @@ public void Age_on_earth() Assert.That(age.OnEarth(), Is.EqualTo(31.69).Within(1E-02)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Age_on_mercury() { @@ -28,7 +28,7 @@ public void Age_on_mercury() Assert.That(age.OnMercury(), Is.EqualTo(280.88).Within(1E-02)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Age_on_venus() { @@ -37,7 +37,7 @@ public void Age_on_venus() Assert.That(age.OnVenus(), Is.EqualTo(9.78).Within(1E-02)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Age_on_mars() { @@ -46,7 +46,7 @@ public void Age_on_mars() Assert.That(age.OnMars(), Is.EqualTo(39.25).Within(1E-02)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Age_on_jupiter() { @@ -55,7 +55,7 @@ public void Age_on_jupiter() Assert.That(age.OnJupiter(), Is.EqualTo(2.41).Within(1E-02)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Age_on_saturn() { @@ -64,7 +64,7 @@ public void Age_on_saturn() Assert.That(age.OnSaturn(), Is.EqualTo(3.23).Within(1E-02)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Age_on_uranus() { @@ -73,7 +73,7 @@ public void Age_on_uranus() Assert.That(age.OnUranus(), Is.EqualTo(1.21).Within(1E-02)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Age_on_neptune() { diff --git a/strain/StrainTest.cs b/strain/StrainTest.cs index f4e3bbbeff..621b00bd93 100644 --- a/strain/StrainTest.cs +++ b/strain/StrainTest.cs @@ -11,28 +11,28 @@ public void Empty_keep() Assert.That(new LinkedList().Keep(x => x < 10), Is.EqualTo(new LinkedList())); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Keep_everything() { Assert.That(new HashSet { 1, 2, 3 }.Keep(x => x < 10), Is.EqualTo(new HashSet { 1, 2, 3 })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Keep_first_and_last() { Assert.That(new[] { 1, 2, 3 }.Keep(x => x % 2 != 0), Is.EqualTo(new[] { 1, 3 })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Keep_neither_first_nor_last() { Assert.That(new List { 1, 2, 3, 4, 5 }.Keep(x => x % 2 == 0), Is.EqualTo(new List { 2, 4 })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Keep_strings() { @@ -40,7 +40,7 @@ public void Keep_strings() Assert.That(words.Keep(x => x.StartsWith("z")), Is.EqualTo("zebra zombies zelot".Split(' '))); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Keep_arrays() { @@ -58,35 +58,35 @@ public void Keep_arrays() Assert.That(actual.Keep(x => x.Contains(5)), Is.EqualTo(expected)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Empty_discard() { Assert.That(new LinkedList().Discard(x => x < 10), Is.EqualTo(new LinkedList())); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Discard_nothing() { Assert.That(new HashSet { 1, 2, 3 }.Discard(x => x > 10), Is.EqualTo(new HashSet { 1, 2, 3 })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Discard_first_and_last() { Assert.That(new[] { 1, 2, 3 }.Discard(x => x % 2 != 0), Is.EqualTo(new[] { 2 })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Discard_neither_first_nor_last() { Assert.That(new List { 1, 2, 3, 4, 5 }.Discard(x => x % 2 == 0), Is.EqualTo(new List { 1, 3, 5 })); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Discard_strings() { @@ -94,7 +94,7 @@ public void Discard_strings() Assert.That(words.Discard(x => x.StartsWith("z")), Is.EqualTo("apple banana cherimoya".Split(' '))); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Discard_arrays() { diff --git a/sum-of-multiples/SumOfMultiplesTest.cs b/sum-of-multiples/SumOfMultiplesTest.cs index d6c5444b03..6a47d5a0be 100644 --- a/sum-of-multiples/SumOfMultiplesTest.cs +++ b/sum-of-multiples/SumOfMultiplesTest.cs @@ -18,42 +18,42 @@ public void Sum_to_1() Assert.That(sumOfMultiples.To(1), Is.EqualTo(0)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Sum_to_3() { Assert.That(sumOfMultiples.To(4), Is.EqualTo(3)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Sum_to_10() { Assert.That(sumOfMultiples.To(10), Is.EqualTo(23)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Sum_to_100() { Assert.That(sumOfMultiples.To(100), Is.EqualTo(2318)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Sum_to_1000() { Assert.That(sumOfMultiples.To(1000), Is.EqualTo(233168)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Configurable_7_13_17_to_20() { Assert.That(new SumOfMultiples(new List { 7, 13, 17 }).To(20), Is.EqualTo(51)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Configurable_43_47_to_10000() { diff --git a/tournament/TournamentTest.cs b/tournament/TournamentTest.cs index 802798fd82..ca7b63adab 100644 --- a/tournament/TournamentTest.cs +++ b/tournament/TournamentTest.cs @@ -81,14 +81,14 @@ public void Test_good() } [Test] - [Ignore] + [Ignore("Remove to run test")] public void Test_ignore_bad_lines() { Assert.That(RunTally(input2).Trim(), Is.EqualTo(expected2)); } [Test] - [Ignore] + [Ignore("Remove to run test")] public void Test_incomplete_competition() { Assert.That(RunTally(input3).Trim(), Is.EqualTo(expected3)); diff --git a/triangle/TriangleTest.cs b/triangle/TriangleTest.cs index d7276f17bb..61a6d8be83 100644 --- a/triangle/TriangleTest.cs +++ b/triangle/TriangleTest.cs @@ -9,98 +9,98 @@ public void Equilateral_triangles_have_equal_sides() Assert.That(Triangle.Kind(2, 2, 2), Is.EqualTo(TriangleKind.Equilateral)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Larger_equilateral_triangles_also_have_equal_sides() { Assert.That(Triangle.Kind(10, 10, 10), Is.EqualTo(TriangleKind.Equilateral)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Isosceles_triangles_have_last_two_sides_equal() { Assert.That(Triangle.Kind(3, 4, 4), Is.EqualTo(TriangleKind.Isosceles)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Isosceles_triangles_have_first_and_last_sides_equal() { Assert.That(Triangle.Kind(4, 3, 4), Is.EqualTo(TriangleKind.Isosceles)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Isosceles_triangles_have_two_first_sides_equal() { Assert.That(Triangle.Kind(4, 4, 3), Is.EqualTo(TriangleKind.Isosceles)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Isosceles_triangles_have_in_fact_exactly_two_sides_equal() { Assert.That(Triangle.Kind(10, 10, 2), Is.EqualTo(TriangleKind.Isosceles)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Scalene_triangles_have_no_equal_sides() { Assert.That(Triangle.Kind(3, 4, 5), Is.EqualTo(TriangleKind.Scalene)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Scalene_triangles_have_no_equal_sides_at_a_larger_scale_too() { Assert.That(Triangle.Kind(10, 11, 12), Is.EqualTo(TriangleKind.Scalene)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Scalene_triangles_have_no_equal_sides_in_descending_order_either() { Assert.That(Triangle.Kind(5, 4, 2), Is.EqualTo(TriangleKind.Scalene)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Very_small_triangles_are_legal() { Assert.That(Triangle.Kind(0.4m, 0.6m, 0.3m), Is.EqualTo(TriangleKind.Scalene)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Triangles_with_no_size_are_illegal() { Assert.Throws(() => Triangle.Kind(0, 0, 0)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Triangles_with_negative_sides_are_illegal() { Assert.Throws(() => Triangle.Kind(3, 4, -5)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Triangles_violating_triangle_inequality_are_illegal() { Assert.Throws(() => Triangle.Kind(1, 1, 3)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Triangles_violating_triangle_inequality_are_illegal_2() { Assert.Throws(() => Triangle.Kind(2, 4, 2)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Triangles_violating_triangle_inequality_are_illegal_3() { diff --git a/trinary/TrinaryTest.cs b/trinary/TrinaryTest.cs index 17b49be337..8909dad0c9 100644 --- a/trinary/TrinaryTest.cs +++ b/trinary/TrinaryTest.cs @@ -4,31 +4,31 @@ public class TrinaryTest { // change Ignore to false to run test case or just remove 'Ignore = true' - [TestCase("1", Result = 1)] - [TestCase("2", Result = 2, Ignore = true)] - [TestCase("10", Result = 3, Ignore = true)] - [TestCase("11", Result = 4, Ignore = true)] - [TestCase("100", Result = 9, Ignore = true)] - [TestCase("112", Result = 14, Ignore = true)] - [TestCase("222", Result = 26, Ignore = true)] - [TestCase("1122000120", Result = 32091, Ignore = true)] + [TestCase("1", ExpectedResult = 1)] + [TestCase("2", ExpectedResult = 2, Ignore = "Remove to run test case")] + [TestCase("10", ExpectedResult = 3, Ignore = "Remove to run test case")] + [TestCase("11", ExpectedResult = 4, Ignore = "Remove to run test case")] + [TestCase("100", ExpectedResult = 9, Ignore = "Remove to run test case")] + [TestCase("112", ExpectedResult = 14, Ignore = "Remove to run test case")] + [TestCase("222", ExpectedResult = 26, Ignore = "Remove to run test case")] + [TestCase("1122000120", ExpectedResult = 32091, Ignore = "Remove to run test case")] public int Trinary_converts_to_decimal(string value) { return Trinary.ToDecimal(value); } - [TestCase("carrot", Ignore = true)] - [TestCase("3", Ignore = true)] - [TestCase("6", Ignore = true)] - [TestCase("9", Ignore = true)] - [TestCase("124578", Ignore = true)] - [TestCase("abc1z", Ignore = true)] + [TestCase("carrot", Ignore = "Remove to run test case")] + [TestCase("3", Ignore = "Remove to run test case")] + [TestCase("6", Ignore = "Remove to run test case")] + [TestCase("9", Ignore = "Remove to run test case")] + [TestCase("124578", Ignore = "Remove to run test case")] + [TestCase("abc1z", Ignore = "Remove to run test case")] public void Invalid_trinary_is_decimal_0(string invalidValue) { Assert.That(Trinary.ToDecimal(invalidValue), Is.EqualTo(0)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Trinary_can_convert_formatted_strings() { diff --git a/twelve-days/TwelveDaysTest.cs b/twelve-days/TwelveDaysTest.cs index 204ba86c21..e8830e92c3 100644 --- a/twelve-days/TwelveDaysTest.cs +++ b/twelve-days/TwelveDaysTest.cs @@ -19,7 +19,7 @@ public void Return_verse_1() Assert.That(twelveDaysSong.Verse(1), Is.EqualTo(expected)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Return_verse_2() { @@ -28,7 +28,7 @@ public void Return_verse_2() Assert.That(twelveDaysSong.Verse(2), Is.EqualTo(expected)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Return_verse_3() { @@ -37,7 +37,7 @@ public void Return_verse_3() Assert.That(twelveDaysSong.Verse(3), Is.EqualTo(expected)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Return_verse_4() { @@ -46,7 +46,7 @@ public void Return_verse_4() Assert.That(twelveDaysSong.Verse(4), Is.EqualTo(expected)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Return_verse_5() { @@ -55,7 +55,7 @@ public void Return_verse_5() Assert.That(twelveDaysSong.Verse(5), Is.EqualTo(expected)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Return_verse_6() { @@ -64,7 +64,7 @@ public void Return_verse_6() Assert.That(twelveDaysSong.Verse(6), Is.EqualTo(expected)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Return_verse_7() { @@ -73,7 +73,7 @@ public void Return_verse_7() Assert.That(twelveDaysSong.Verse(7), Is.EqualTo(expected)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Return_verse_8() { @@ -82,7 +82,7 @@ public void Return_verse_8() Assert.That(twelveDaysSong.Verse(8), Is.EqualTo(expected)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Return_verse_9() { @@ -91,7 +91,7 @@ public void Return_verse_9() Assert.That(twelveDaysSong.Verse(9), Is.EqualTo(expected)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Return_verse_10() { @@ -100,7 +100,7 @@ public void Return_verse_10() Assert.That(twelveDaysSong.Verse(10), Is.EqualTo(expected)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Return_verse_11() { @@ -109,7 +109,7 @@ public void Return_verse_11() Assert.That(twelveDaysSong.Verse(11), Is.EqualTo(expected)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Return_verse_12() { @@ -118,7 +118,7 @@ public void Return_verse_12() Assert.That(twelveDaysSong.Verse(12), Is.EqualTo(expected)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Return_multiple_verses() { @@ -129,7 +129,7 @@ public void Return_multiple_verses() Assert.That(twelveDaysSong.Verses(1, 3), Is.EqualTo(expected)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Return_entire_song() { diff --git a/word-count/WordCountTest.cs b/word-count/WordCountTest.cs index 6aab207879..06cb02490c 100644 --- a/word-count/WordCountTest.cs +++ b/word-count/WordCountTest.cs @@ -14,7 +14,7 @@ public void Count_one_word() Assert.That(Phrase.WordCount("word"), Is.EqualTo(counts)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Count_one_of_each() { @@ -27,7 +27,7 @@ public void Count_one_of_each() Assert.That(Phrase.WordCount("one of each"), Is.EqualTo(counts)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Count_multiple_occurrences() { @@ -42,7 +42,7 @@ public void Count_multiple_occurrences() Assert.That(Phrase.WordCount("one fish two fish red fish blue fish"), Is.EqualTo(counts)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Count_everything_just_once() { @@ -58,7 +58,7 @@ public void Count_everything_just_once() Assert.That(Phrase.WordCount("all the kings horses and all the kings men"), Is.EqualTo(counts)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Ignore_punctuation() { @@ -73,7 +73,7 @@ public void Ignore_punctuation() Assert.That(Phrase.WordCount("car : carpet as java : javascript!!&@$%^&"), Is.EqualTo(counts)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Handles_cramped_list() { @@ -86,7 +86,7 @@ public void Handles_cramped_list() Assert.That(Phrase.WordCount("one,two,three"), Is.EqualTo(counts)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Include_numbers() { @@ -99,7 +99,7 @@ public void Include_numbers() Assert.That(Phrase.WordCount("testing, 1, 2 testing"), Is.EqualTo(counts)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Normalize_case() { @@ -110,7 +110,7 @@ public void Normalize_case() Assert.That(Phrase.WordCount("go Go GO"), Is.EqualTo(counts)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void With_apostrophes() { @@ -125,7 +125,7 @@ public void With_apostrophes() Assert.That(Phrase.WordCount("First: don't laugh. Then: don't cry."), Is.EqualTo(counts)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void With_free_standing_apostrophes() { @@ -136,7 +136,7 @@ public void With_free_standing_apostrophes() Assert.That(Phrase.WordCount("go ' Go '' GO"), Is.EqualTo(counts)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void With_apostrophes_as_quotes() { diff --git a/wordy/WordyTest.cs b/wordy/WordyTest.cs index 6fdb70c499..c105f5a126 100644 --- a/wordy/WordyTest.cs +++ b/wordy/WordyTest.cs @@ -9,105 +9,105 @@ public void Can_parse_and_solve_addition_problems() Assert.That(WordProblem.Solve("What is 1 plus 1?"), Is.EqualTo(2)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Can_add_double_digit_numbers() { Assert.That(WordProblem.Solve("What is 53 plus 2?"), Is.EqualTo(55)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Can_add_negative_numbers() { Assert.That(WordProblem.Solve("What is -1 plus -10?"), Is.EqualTo(-11)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Can_add_large_numbers() { Assert.That(WordProblem.Solve("What is 123 plus 45678?"), Is.EqualTo(45801)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Can_parse_and_solve_subtraction_problems() { Assert.That(WordProblem.Solve("What is 4 minus -12"), Is.EqualTo(16)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Can_parse_and_solve_multiplication_problems() { Assert.That(WordProblem.Solve("What is -3 multiplied by 25?"), Is.EqualTo(-75)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Can_parse_and_solve_division_problems() { Assert.That(WordProblem.Solve("What is 33 divided by -3?"), Is.EqualTo(-11)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Can_add_twice() { Assert.That(WordProblem.Solve("What is 1 plus 1 plus 1?"), Is.EqualTo(3)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Can_add_then_subtract() { Assert.That(WordProblem.Solve("What is 1 plus 5 minus -2?"), Is.EqualTo(8)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Can_subtract_twice() { Assert.That(WordProblem.Solve("What is 20 minus 4 minus 13?"), Is.EqualTo(3)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Can_subtract_then_add() { Assert.That(WordProblem.Solve("What is 17 minus 6 plus 3?"), Is.EqualTo(14)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Can_multiply_twice() { Assert.That(WordProblem.Solve("What is 2 multiplied by -2 multiplied by 3?"), Is.EqualTo(-12)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Can_add_then_multiply() { Assert.That(WordProblem.Solve("What is -3 plus 7 multiplied by -2?"), Is.EqualTo(-8)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Can_divide_twice() { Assert.That(WordProblem.Solve("What is -12 divided by 2 divided by -3?"), Is.EqualTo(2)); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Cubed_is_too_advanced() { Assert.That(() => WordProblem.Solve("What is 53 cubed?"), Throws.ArgumentException); } - [Ignore] + [Ignore("Remove to run test")] [Test] public void Irrelevent_problems_are_not_valid() {