public void Should_Encode_Special_Characters() { const string stringToBeEncoded = "This $ is & a ? test * with @ spaces"; var encodeDecodeProvider = new EncodeDecodeProvider(); var result = encodeDecodeProvider.UrlEncode(stringToBeEncoded); Assert.AreEqual("This%20%24%20is%20%26%20a%20%3f%20test%20*%20with%20%40%20spaces", result); }
public void Should_Encode_Spaces() { const string stringToBeEncoded = "This is a test with spaces"; var encodeDecodeProvider = new EncodeDecodeProvider(); var result = encodeDecodeProvider.UrlEncode(stringToBeEncoded); Assert.AreEqual("This%20is%20a%20test%20with%20spaces", result); }