ReplaceNewLineWithSpace_WithStringSeparatedByNewLineWithPredecessorAndFollowedByWhiteSpace_ShouldReturnStringWithReplacedNewLinesAndTrimmedWhiteSpace() { string inputValue = "This is a test string \n separated by new line."; string outputValue = MsBuildStringUtilities.ReplaceNewLineWithSpace(inputValue); Assert.AreEqual("This is a test string separated by new line.", outputValue, "A string separated by new line should return a 1:1 replacement with a space"); }
public void ReplaceNewLineWithSpace_WithStringWithoutNewLine_ShouldReturnStringAsIs() { string inputValue = "This is a test string"; string outputValue = MsBuildStringUtilities.ReplaceNewLineWithSpace(inputValue); Assert.AreEqual(inputValue, outputValue, "A string without new line should not be altered."); }