コード例 #1
0
 public void Should_Decode_Special_Characters()
 {
     const string stringToBeEncoded = "This%20%24%20is%20%26%20a%20%3f%20test%20*%20with%20%40%20spaces";
     var encodeDecodeProvider = new EncodeDecodeProvider();
     var result = encodeDecodeProvider.UrlDecode(stringToBeEncoded);
     Assert.AreEqual("This $ is & a ? test * with @ spaces", result);
 }
コード例 #2
0
 public void Should_Decode_Spaces()
 {
     const string stringToBeDecoded = "This%20is%20a%20test%20with%20spaces";
     var encodeDecodeProvider = new EncodeDecodeProvider();
     var result = encodeDecodeProvider.UrlDecode(stringToBeDecoded);
     Assert.AreEqual("This is a test with spaces", result);
 }