public void Test002_GivenTitleCase_GetTitleCaseReturnsInputWithFirstLetterCapitalized() { TitleCase titleCase = new TitleCase(); Assert.AreEqual("Apple", titleCase.GetTitleCase("apple")); // The issue wasn't that I needed to add this second assert, but that I skipped the 'refactor' step of 'Red, Green, Refactor' // to eliminate the magic character Assert.AreEqual("Knife", titleCase.GetTitleCase("knife")); }
public void Test011_GivenTitleCase_GetTitleCaseReturnsCapitalisedFirstWordEvenWhenInputAndMinorWordsAreTheSameAndLowerCase() { TitleCase titleCase = new TitleCase(); Assert.AreEqual("Ab", titleCase.GetTitleCase("ab", "ab")); }
public void Test010_GivenTitleCase_GetTitleCaseWorksEvenIfALaterWordIsTheSameAsTheFirstWord() { TitleCase titleCase = new TitleCase(); Assert.AreEqual("The Wind in the Willows", titleCase.GetTitleCase("the wind in the willows", "the in")); }
public void Test001_GivenTitleCase_GetTitleCaseReturnsInputString() { TitleCase titleCase = new TitleCase(); Assert.AreEqual("Apple", titleCase.GetTitleCase("Apple")); }
public void Test009_GivenTitleCase_GetTitleCaseWorksEvenIfFirstLetterOfWordIsUsedLaterInWord() { TitleCase titleCase = new TitleCase(); Assert.AreEqual("Wind in the Willows", titleCase.GetTitleCase("wind in the willows", "the in")); }
public void Test008_GivenTitleCase_GetTitleCaseMakesLowerCaseAllLettersAfterTheFirstInEachWord() { TitleCase titleCase = new TitleCase(); Assert.AreEqual("Wind in the Hills", titleCase.GetTitleCase("WIND IN THE HILLS", "The In")); }
public void Test007_GivenTitleCase_GetTitleCaseReturnsWithFirstWordCapitalizedEvenThoughItIsPresentInMinorWords() { TitleCase titleCase = new TitleCase(); Assert.AreEqual("A Clash of Jesters", titleCase.GetTitleCase("a clash of jesters", "of a")); }
public void Test006_GivenTitleCase_GetTitleCaseReturnsInputWithFirstAndFourthWordsTitleCasedSecondAndThirdWordsLowerCase() { TitleCase titleCase = new TitleCase(); Assert.AreEqual("Gone with the Wind", titleCase.GetTitleCase("gone with the wind", "the with")); }
public void Test005_GivenTitleCase_GetTitleCaseReturnsInputWithFirstLettersOfTwoWordsCapitalized() { TitleCase titleCase = new TitleCase(); Assert.AreEqual("Apple Pie", titleCase.GetTitleCase("apple pie")); }
public void Test003_GivenTitleCase_GetTitleCaseReturnsInputWithFirstLetterLowerCaseDueToMinorWordsParameter() { TitleCase titleCase = new TitleCase(); Assert.AreEqual("An apple", titleCase.GetTitleCase("an apple", "apple")); }
public void Test012_GivenTitleCase_GetTitleCaseTreatsNullMinorWordsParameterAsBlankString() { TitleCase titleCase = new TitleCase(); Assert.AreEqual("Abc Def Ghi", titleCase.GetTitleCase("aBC deF Ghi", null)); }
public string GetTitleCase_Test(string minor, string original) { return(TitleCase.GetTitleCase(minor, original)); }