public static IsPangram ( string input ) : bool | ||
input | string | |
Результат | bool |
public void InValidPangramTooShort() { Pangram pangram = new Pangram(); //Pass in nothing Assert.AreEqual(pangram.IsPangram(String.Empty), 0); }
public void ValidPangramTooLong() { Pangram pangram = new Pangram(); Assert.AreEqual(pangram.IsPangram("We promptly judged antique ivory buckles for the prize" + "We promptly judged antique ivory buckles for the prize We promptly judged antique ivory buckles for the prize"), 0); }
public void InvalidPangramReturnsZeroAgain() { Pangram pangram = new Pangram(); Assert.AreEqual(pangram.IsPangram("Hello World"), 0); }
public void Case_insensitive() { Assert.False(Pangram.IsPangram("the quick brown fox jumps over with lazy FX")); }
public void Missing_letters_replaced_by_numbers() { Assert.False(Pangram.IsPangram("7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog")); }
public void With_underscores() { Assert.True(Pangram.IsPangram("the_quick_brown_fox_jumps_over_the_lazy_dog")); }
public void Missing_the_letter_x() { Assert.False(Pangram.IsPangram("a quick movement of the enemy will jeopardize five gunboats")); }
public void Perfect_lower_case() { Assert.True(Pangram.IsPangram("abcdefghijklmnopqrstuvwxyz")); }
public void Pangram_with_non_ascii_characters() { var input = "Victor jagt zwölf Boxkämpfer quer über den großen Sylter Deich."; Assert.That(Pangram.IsPangram(input), Is.EqualTo(true)); }
public void Upper_and_lower_case_versions_of_the_same_character_should_not_be_counted_separately() { Assert.False(Pangram.IsPangram("the quick brown fox jumps over with lazy FX")); }
public void Another_missing_character_e_g_h() { Assert.False(Pangram.IsPangram("five boxing wizards jump quickly at it")); }
public void Recognizes_a_perfect_lower_case_pangram() { Assert.True(Pangram.IsPangram("abcdefghijklmnopqrstuvwxyz")); }
public void Pangram_with_only_lower_case() => Assert.True(Pangram.IsPangram("the quick brown fox jumps over the lazy dog"));
public void Empty_sentence() { var input = ""; Assert.Equal(false, Pangram.IsPangram(input)); }
public void Missing_letters_replaced_by_numbers() { var input = "7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog"; Assert.That(Pangram.IsPangram(input), Is.EqualTo(false)); }
public void Sentence_empty() { Assert.False(Pangram.IsPangram("")); }
public void Pangram_with_mixed_case_and_punctuation() { var input = "\"Five quacking Zephyrs jolt my wax bed.\""; Assert.That(Pangram.IsPangram(input), Is.EqualTo(true)); }
public void Pangram_with_only_lower_case() { var input = "the quick brown fox jumps over the lazy dog"; Assert.That(Pangram.IsPangram(input), Is.EqualTo(true)); }
public void Pangram_in_alphabet_other_than_ascii() { var input = "Широкая электрификация южных губерний даст мощный толчок подъёму сельского хозяйства."; Assert.That(Pangram.IsPangram(input), Is.EqualTo(false)); }
public void Missing_character_x() { var input = "a quick movement of the enemy will jeopardize five gunboats"; Assert.That(Pangram.IsPangram(input), Is.EqualTo(false)); }
public void Only_lower_case() { Assert.True(Pangram.IsPangram("the quick brown fox jumps over the lazy dog")); }
public void Another_missing_character_x() { var input = "the quick brown fish jumps over the lazy dog"; Assert.That(Pangram.IsPangram(input), Is.EqualTo(false)); }
public void Missing_the_letter_h() { Assert.False(Pangram.IsPangram("five boxing wizards jump quickly at it")); }
public void Pangram_with_underscores() { var input = "the_quick_brown_fox_jumps_over_the_lazy_dog"; Assert.That(Pangram.IsPangram(input), Is.EqualTo(true)); }
public void With_numbers() { Assert.True(Pangram.IsPangram("the 1 quick brown fox jumps over the 2 lazy dogs")); }
public void Pangram_with_numbers() { var input = "the 1 quick brown fox jumps over the 2 lazy dogs"; Assert.That(Pangram.IsPangram(input), Is.EqualTo(true)); }
public void Mixed_case_and_punctuation() { Assert.True(Pangram.IsPangram("\"Five quacking Zephyrs jolt my wax bed.\"")); }
public void Empty_sentence() { var input = ""; Assert.That(Pangram.IsPangram(input), Is.EqualTo(false)); }
public void Empty_sentence() { Assert.False(Pangram.IsPangram("")); }
public void MissingOneLetterToQualifyAsPangram() { Pangram pangram = new Pangram(); Assert.AreEqual(pangram.IsPangram("Pac my box with five dozen liquor jugs."), 0); }