Changes recommended by Rider/Resharper
This commit is contained in:
30
VAR.HttpServer.Tests/HttpUtilityTests.cs
Normal file
30
VAR.HttpServer.Tests/HttpUtilityTests.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
||||
|
||||
namespace VAR.HttpServer.Tests
|
||||
{
|
||||
[TestClass()]
|
||||
public class HttpUtilityTests
|
||||
{
|
||||
[TestMethod()]
|
||||
public void UrlEncode__UrlDecode__TestWithAsciiSymbols()
|
||||
{
|
||||
string strOrigin = "Hello World! $%&//();@!";
|
||||
|
||||
string strEncoded = HttpUtility.UrlEncode(strOrigin);
|
||||
string strDecoded = HttpUtility.UrlDecode(strEncoded);
|
||||
|
||||
Assert.AreEqual(strOrigin, strDecoded);
|
||||
}
|
||||
|
||||
[TestMethod()]
|
||||
public void UrlEncode__UrlDecode__TestWithLocalSymbols()
|
||||
{
|
||||
string strOrigin = "Hello World! ¿?¡! ñÑ áéíóú ";
|
||||
|
||||
string strEncoded = HttpUtility.UrlEncode(strOrigin);
|
||||
string strDecoded = HttpUtility.UrlDecode(strEncoded);
|
||||
|
||||
Assert.AreEqual(strOrigin, strDecoded);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user