public void Replace_ReplacesWordWithNewWord_string() { string sentenceToFix = "The cat barked at the cathedral"; string testFixedSentence = "The dog barked at the cathedral"; ReplaceWords testCase = new ReplaceWords("cat", sentenceToFix, "dog"); string fixedSentence = testCase.Replace(); Assert.AreEqual(testFixedSentence, fixedSentence); }
public void SetIgnoreCaseTrue_IgnoresCasing_true() { string sentenceToFix = "ThE cAt BaRked at the CatHedral"; string testFixedSentence = "the dog barked at the cathedral"; ReplaceWords testCase = new ReplaceWords("cat", sentenceToFix, "dog"); testCase.SetIgnoreCaseTrue(true); string fixedSentence = testCase.Replace(); Assert.AreEqual(testFixedSentence, fixedSentence); }