public void InputOfNewLineInAString_ReturnsANewLine()// input returns a new line char { string input = "\r\n"; string expected = "\r\n"; var actual = TrimSpaces.CheckForWhiteSpace(input); Assert.AreEqual(expected, actual); }
public void CheckForTabsAndRemoveThemFromString()// check for tabs and remove { string input = "abc\t "; string expected = "abc"; var actual = TrimSpaces.CheckForWhiteSpace(input); Assert.AreEqual(expected, actual); }
public void RemoveWhiteSpaceAtTheEndOfSecondLine()// remove white space at the end of string { string input = "abc\r\n cd \r\n"; string expected = "abc\r\ncd\r\n"; var actual = TrimSpaces.CheckForWhiteSpace(input); Assert.AreEqual(expected, actual); }
public void RemoveWhiteSpacesAtEndOfString() { string input = "abc "; string expected = "abc"; var actual = TrimSpaces.CheckForWhiteSpace(input); Assert.AreEqual(expected, actual); }
public void KeepsWhitespaceAtBeginningOfString()// this test should retain white space at the beginning of a string { string input = " abc "; string expected = " abc"; var actual = TrimSpaces.CheckForWhiteSpace(input); Assert.AreEqual(expected, actual); }
public void CheckForNoWhitespace_InAString() { string input = "abc"; string expected = "abc"; var actual = TrimSpaces.CheckForWhiteSpace(input); Assert.AreEqual(expected, actual); }
public void RemoveWhiteSpaceInMiddleOfString() { string input = "abc\r\n cd \r\n "; string expected = "abc\r\ncd\r\n"; var actual = TrimSpaces.CheckForWhiteSpace(input); Assert.AreEqual(expected, actual); }
public void KeepsWhitespaceAtBeginningOfString() { string input = " abc "; string expected = " abc"; var actual = TrimSpaces.CheckForWhiteSpace(input); Assert.AreEqual(expected, actual); }
public void CheckIfAStringIsEmpty_ReturnException() { string input = ""; Assert.Throws <System.ArgumentException>(() => TrimSpaces.CheckForWhiteSpace(input)); }
public void CheckIfAStringIsNull_ReturnException() { string input = null; Assert.Throws <System.NullReferenceException>(() => TrimSpaces.CheckForWhiteSpace(input)); }