public void QueryStringCanHandleDuplicatedEntries() { var builder = new UrlParts(serverUtil, "home/index.ext"); builder.SetQueryString("City=SP&State=MD&State=NY"); Assert.AreEqual("home/index.ext?City=SP&State=MD&State=NY", builder.BuildPath()); }
public void BuildPathWithPathInfoAndQueryString() { var builder = new UrlParts(serverUtil, "controller", "action"); builder.PathInfoDict["State"] = "FL"; builder.SetQueryString("type=Residential"); Assert.AreEqual("controller/action/State/FL?type=Residential", builder.BuildPath()); }
public void QueryStringIsExtractedAndParsed() { var builder = new UrlParts(serverUtil, "home/index.ext"); builder.SetQueryString("City=SP&State=MD"); builder.QueryString["type"] = "home"; Assert.AreEqual("home/index.ext?City=SP&State=MD&type=home", builder.BuildPath()); }