示例#1
0
        public void Find_A_Repeating_Word_Despite_Case()
        {
            string testString = "Here is a string.  It has the word here twice.";
            string actual     = RepeatedWord.RepeatWord(testString);
            string expected   = "here";

            Assert.Equal(expected, actual);
        }
示例#2
0
        public void Successfully_Return_The_First_Repeated_Word()
        {
            string input    = "Once upon a time, there was a brave princess who";
            string actual   = RepeatedWord.RepeatWord(input);
            string expected = "a";

            Assert.Equal(expected, actual);
        }
示例#3
0
        public void Return_Null_If_Input_String_Is_Empty()
        {
            string input = "";

            Assert.Null(RepeatedWord.RepeatWord(input));
        }
示例#4
0
        public void Reutrn_Null_If_There_Are_No_Repeats()
        {
            string input = "There are no repeats in this sentence.";

            Assert.Null(RepeatedWord.RepeatWord(input));
        }