public void ApplyParamsToUrlTestTwoSame() { Requester cm = new Requester(); string url = "https://reqbin.com/echo/get/json"; Dictionary <string, string> parameters = new Dictionary <string, string>() { { "p1", "P1" } }; var newUrl = cm.ApplyParamsToUrl(url, parameters); parameters["p1"] = "P2"; newUrl = cm.ApplyParamsToUrl(newUrl, parameters); Assert.AreEqual("https://reqbin.com:443/echo/get/json?p1=P2", newUrl); }
public void ApplyParamsToUrlTestEmpty() { Requester cm = new Requester(); string url = "https://reqbin.com/echo/get/json"; Dictionary <string, string> parameters = new Dictionary <string, string>(); var newUrl = cm.ApplyParamsToUrl(url, parameters); Assert.AreEqual("https://reqbin.com:443/echo/get/json", newUrl); }
public void ApplyParamsToUrlTestForcedPort2() { Requester cm = new Requester(); string url = "https://reqbin.com:50080/echo/get/json"; Dictionary <string, string> parameters = new Dictionary <string, string>() { { "p1", "P1" } }; var newUrl = cm.ApplyParamsToUrl(url, parameters); Assert.AreEqual("https://reqbin.com:50080/echo/get/json?p1=P1", newUrl); }