Example #1
0
        public void With_Question_Mark_In_Between_Words()
        {
            var sut = new WordCounter();

            sut.CountWords("Hi??????????ich ?? bin??????blau???? richtig!").Should().Be(5);
        }
Example #2
0
        public void With_Dash_Between_Words2()
        {
            var sut = new WordCounter();

            sut.CountWords("Hi,ich,bin blau - richtig?").Should().Be(5);
        }
Example #3
0
        public void With_Exclamation_Mark_In_Between_Words()
        {
            var sut = new WordCounter();

            sut.CountWords("Hi!!! ich!!!!!!!!bin!!richtig!blau!!!!!").Should().Be(5);
        }
Example #4
0
        public void With_Dash_Between_Words1()
        {
            var sut = new WordCounter();

            sut.CountWords("Hi,ich,bin blau-möger").Should().Be(4);
        }
Example #5
0
        public void Empty_String_Has_0_Words()
        {
            var sut = new WordCounter();

            sut.CountWords("").Should().Be(0);
        }
Example #6
0
        public void Two_Spaces_Between_Words()
        {
            var sut = new WordCounter();

            sut.CountWords("Hi  ich      bin").Should().Be(3);
        }
Example #7
0
        public void With_Commas_Between_Words()
        {
            var sut = new WordCounter();

            sut.CountWords("Hi,ich,bin").Should().Be(3);
        }
Example #8
0
        public void Spaces_Between_Words_Should_Return_10()
        {
            var sut = new WordCounter();

            sut.CountWords("Hi ich bin trölf").Should().Be(4);
        }
Example #9
0
        public void Words_With_Ä_And_Ü_Should_Return_1()
        {
            var sut = new WordCounter();

            sut.CountWords("Äpfel und Übung").Should().Be(3);
        }
Example #10
0
        public void Ten_Words_Should_Return_10()
        {
            var sut = new WordCounter();

            sut.CountWords("Ich_bin_Ingo_und_ich_spiele_sehr_gerne_am_Computer").Should().Be(10);
        }
Example #11
0
        public void One_Word_In_String_Should_Return_1()
        {
            var sut = new WordCounter();

            sut.CountWords("Wort").Should().Be(1);
        }
Example #12
0
        public void With_LineBreaks()
        {
            var sut = new WordCounter();

            sut.CountWords("das ist eine\ndatei mit\nmehreren\nzeilen\nund zeugs").Should().Be(9);
        }