public void ArrayWithNoSpacesIsUnchanged() { //arrange var noSpaces = "noSpaces".ToCharArray(); //act char[] result = Q1_3.GetHTMLSpaceStringFromCharArray(noSpaces, 8); //assert Assert.AreEqual(noSpaces, result); }
public void CanConvertMultipleSpaces() { //arrange var multipleSpacesBefore = "My Name is John Smith ".ToCharArray(); var multipleSpacesAfter = "My%20Name%20is%20John%20Smith".ToCharArray(); //act char[] result = Q1_3.GetHTMLSpaceStringFromCharArray(multipleSpacesBefore, 21); //assert CompareCharArrays(result, multipleSpacesAfter); }
public void CanConvertOneSpace() { //arrange var oneSpaceBefore = "one space ".ToCharArray(); var oneSpaceAfter = "one%20space".ToCharArray(); //act char[] result = Q1_3.GetHTMLSpaceStringFromCharArray(oneSpaceBefore, 9); //assert CompareCharArrays(result, oneSpaceAfter); }