IsPangram() public static method

public static IsPangram ( string input ) : bool
input string
return bool
Beispiel #1
0
        public void InValidPangramTooShort()
        {
            Pangram pangram = new Pangram();

            //Pass in nothing
            Assert.AreEqual(pangram.IsPangram(String.Empty), 0);
        }
Beispiel #2
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);
        }
Beispiel #3
0
        public void InvalidPangramReturnsZeroAgain()
        {
            Pangram pangram = new Pangram();

            Assert.AreEqual(pangram.IsPangram("Hello World"), 0);
        }
Beispiel #4
0
 public void Case_insensitive()
 {
     Assert.False(Pangram.IsPangram("the quick brown fox jumps over with lazy FX"));
 }
Beispiel #5
0
 public void Missing_letters_replaced_by_numbers()
 {
     Assert.False(Pangram.IsPangram("7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog"));
 }
Beispiel #6
0
 public void With_underscores()
 {
     Assert.True(Pangram.IsPangram("the_quick_brown_fox_jumps_over_the_lazy_dog"));
 }
Beispiel #7
0
 public void Missing_the_letter_x()
 {
     Assert.False(Pangram.IsPangram("a quick movement of the enemy will jeopardize five gunboats"));
 }
Beispiel #8
0
 public void Perfect_lower_case()
 {
     Assert.True(Pangram.IsPangram("abcdefghijklmnopqrstuvwxyz"));
 }
Beispiel #9
0
    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));
    }
Beispiel #10
0
 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"));
 }
Beispiel #11
0
 public void Another_missing_character_e_g_h()
 {
     Assert.False(Pangram.IsPangram("five boxing wizards jump quickly at it"));
 }
Beispiel #12
0
 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"));
Beispiel #14
0
    public void Empty_sentence()
    {
        var input = "";

        Assert.Equal(false, Pangram.IsPangram(input));
    }
Beispiel #15
0
    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));
    }
Beispiel #16
0
 public void Sentence_empty()
 {
     Assert.False(Pangram.IsPangram(""));
 }
Beispiel #17
0
    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));
    }
Beispiel #18
0
    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));
    }
Beispiel #19
0
    public void Pangram_in_alphabet_other_than_ascii()
    {
        var input = "Широкая электрификация южных губерний даст мощный толчок подъёму сельского хозяйства.";

        Assert.That(Pangram.IsPangram(input), Is.EqualTo(false));
    }
Beispiel #20
0
    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));
    }
Beispiel #21
0
 public void Only_lower_case()
 {
     Assert.True(Pangram.IsPangram("the quick brown fox jumps over the lazy dog"));
 }
Beispiel #22
0
    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));
    }
Beispiel #23
0
 public void Missing_the_letter_h()
 {
     Assert.False(Pangram.IsPangram("five boxing wizards jump quickly at it"));
 }
Beispiel #24
0
    public void Pangram_with_underscores()
    {
        var input = "the_quick_brown_fox_jumps_over_the_lazy_dog";

        Assert.That(Pangram.IsPangram(input), Is.EqualTo(true));
    }
Beispiel #25
0
 public void With_numbers()
 {
     Assert.True(Pangram.IsPangram("the 1 quick brown fox jumps over the 2 lazy dogs"));
 }
Beispiel #26
0
    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));
    }
Beispiel #27
0
 public void Mixed_case_and_punctuation()
 {
     Assert.True(Pangram.IsPangram("\"Five quacking Zephyrs jolt my wax bed.\""));
 }
Beispiel #28
0
    public void Empty_sentence()
    {
        var input = "";

        Assert.That(Pangram.IsPangram(input), Is.EqualTo(false));
    }
Beispiel #29
0
 public void Empty_sentence()
 {
     Assert.False(Pangram.IsPangram(""));
 }
Beispiel #30
0
        public void MissingOneLetterToQualifyAsPangram()
        {
            Pangram pangram = new Pangram();

            Assert.AreEqual(pangram.IsPangram("Pac my box with five dozen liquor jugs."), 0);
        }