Пример #1
0
        public void ReturnsFirstSeveralLettersOfWord()
        {
            Simon  simon = new Simon();
            string s     = "abcdefg";

            Assert.AreEqual("a", Simon.StartOfWord(s, 1));
            Assert.AreEqual("ab", Simon.StartOfWord(s, 2));
            Assert.AreEqual("abc", Simon.StartOfWord(s, 3));
        }
Пример #2
0
        public void ReturnsFirstWordOfHelloWorld()
        {
            Simon simon = new Simon();

            Assert.AreEqual("Hello", Simon.FirstWord("Hello World"));
        }
Пример #3
0
        public void ReturnsFirstLetterOfWord()
        {
            Simon simon = new Simon();

            Assert.AreEqual("h", Simon.StartOfWord("hello", 1));
        }
Пример #4
0
        public void ReturnsFirstTwoLettersOfWord()
        {
            Simon simon = new Simon();

            Assert.AreEqual("Bo", Simon.StartOfWord("Bob", 2));
        }
Пример #5
0
        public void ShouldRepeat()
        {
            Simon simon = new Simon();

            Assert.AreEqual("hello hello", Simon.Repeat("hello"));
        }
Пример #6
0
        public void ShouldRepeatANumberOfTimes()
        {
            Simon simon = new Simon();

            Assert.AreEqual("hello hello hello", Simon.Repeat("hello", 3));
        }
Пример #7
0
        public void ShoutHello()
        {
            Simon simon = new Simon();

            Assert.AreEqual("HELLO", Simon.Shout("hello"));
        }
Пример #8
0
        public void ShoutMultipleWords()
        {
            Simon simon = new Simon();

            Assert.AreEqual("HELLO WORLD", Simon.Shout("hello world"));
        }
Пример #9
0
        public void ShouldEchoHello()
        {
            Simon simon = new Simon();

            Assert.AreEqual("hello", Simon.Echo("hello"));
        }
Пример #10
0
        public void ShouldEchoBye()
        {
            Simon simon = new Simon();

            Assert.AreEqual("bye", Simon.Echo("Bye"));
        }
Пример #11
0
        public void CapitilizeLittleWordsInBeginningOfSentence()
        {
            Simon simon = new Simon();

            Assert.AreEqual("The Bridge over the River Kwai", Simon.Titleize("the bridge over the river kwai"));
        }
Пример #12
0
        public void DontCapitilizeLittleWords()
        {
            Simon simon = new Simon();

            Assert.AreEqual("War and Peace", Simon.Titleize("war and peace"));
        }
Пример #13
0
        public void CapitilizeEveryWord()
        {
            Simon simon = new Simon();

            Assert.AreEqual("David Copperfield", Simon.Titleize("david copperfield"));
        }
Пример #14
0
        public void CapitilizeAWord()
        {
            Simon simon = new Simon();

            Assert.AreEqual("Jaws", Simon.Titleize("jaws"));
        }
Пример #15
0
        public void ReturnsFirstWordOfOhDear()
        {
            Simon simon = new Simon();

            Assert.AreEqual("Oh", Simon.FirstWord("Oh Dear"));
        }