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)); }
public void ReturnsFirstWordOfHelloWorld() { Simon simon = new Simon(); Assert.AreEqual("Hello", Simon.FirstWord("Hello World")); }
public void ReturnsFirstLetterOfWord() { Simon simon = new Simon(); Assert.AreEqual("h", Simon.StartOfWord("hello", 1)); }
public void ReturnsFirstTwoLettersOfWord() { Simon simon = new Simon(); Assert.AreEqual("Bo", Simon.StartOfWord("Bob", 2)); }
public void ShouldRepeat() { Simon simon = new Simon(); Assert.AreEqual("hello hello", Simon.Repeat("hello")); }
public void ShouldRepeatANumberOfTimes() { Simon simon = new Simon(); Assert.AreEqual("hello hello hello", Simon.Repeat("hello", 3)); }
public void ShoutHello() { Simon simon = new Simon(); Assert.AreEqual("HELLO", Simon.Shout("hello")); }
public void ShoutMultipleWords() { Simon simon = new Simon(); Assert.AreEqual("HELLO WORLD", Simon.Shout("hello world")); }
public void ShouldEchoHello() { Simon simon = new Simon(); Assert.AreEqual("hello", Simon.Echo("hello")); }
public void ShouldEchoBye() { Simon simon = new Simon(); Assert.AreEqual("bye", Simon.Echo("Bye")); }
public void CapitilizeLittleWordsInBeginningOfSentence() { Simon simon = new Simon(); Assert.AreEqual("The Bridge over the River Kwai", Simon.Titleize("the bridge over the river kwai")); }
public void DontCapitilizeLittleWords() { Simon simon = new Simon(); Assert.AreEqual("War and Peace", Simon.Titleize("war and peace")); }
public void CapitilizeEveryWord() { Simon simon = new Simon(); Assert.AreEqual("David Copperfield", Simon.Titleize("david copperfield")); }
public void CapitilizeAWord() { Simon simon = new Simon(); Assert.AreEqual("Jaws", Simon.Titleize("jaws")); }
public void ReturnsFirstWordOfOhDear() { Simon simon = new Simon(); Assert.AreEqual("Oh", Simon.FirstWord("Oh Dear")); }