예제 #1
0
        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());
        }
예제 #2
0
        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());
        }
예제 #3
0
        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());
        }