public void RedirectToUrlWithQueryStringAsDict()
		{
			UrlInfo url = new UrlInfo("area", "home", "index", "", ".castle");
			StubResponse response = new StubResponse(url, urlBuilder, urlBuilder.ServerUtil, new RouteMatch());
			response.RedirectToUrl("/uol/com/folha", DictHelper.Create("id=1", "name=john doe"));
			Assert.AreEqual("/uol/com/folha?id=1&name=john+doe", response.RedirectedTo);

			response.RedirectToUrl("/uol/com/folha?something=1", DictHelper.Create("id=1", "name=john doe"));
			Assert.AreEqual("/uol/com/folha?something=1&id=1&name=john+doe", response.RedirectedTo);
		}
Exemple #2
0
        public void RedirectToUrlWithQueryStringAsDict()
        {
            var url      = new UrlInfo("area", "home", "index", "", ".castle");
            var response = new StubResponse(url, urlBuilder, urlBuilder.ServerUtil, new RouteMatch());

            response.RedirectToUrl("/uol/com/folha", DictHelper.Create("id=1", "name=john doe"));
            Assert.AreEqual("/uol/com/folha?id=1&name=john+doe", response.RedirectedTo);

            response.RedirectToUrl("/uol/com/folha?something=1", DictHelper.Create("id=1", "name=john doe"));
            Assert.AreEqual("/uol/com/folha?something=1&id=1&name=john+doe", response.RedirectedTo);
        }
		public void RedirectToUrlDoesNotTouchUrl()
		{
			UrlInfo url = new UrlInfo("area", "home", "index", "", ".castle");
			StubResponse response = new StubResponse(url, urlBuilder, urlBuilder.ServerUtil, new RouteMatch());
			response.RedirectToUrl("/uol/com/folha");
			Assert.AreEqual("/uol/com/folha", response.RedirectedTo);
		}
Exemple #4
0
        public void RedirectToUrlDoesNotTouchUrl()
        {
            var url      = new UrlInfo("area", "home", "index", "", ".castle");
            var response = new StubResponse(url, urlBuilder, urlBuilder.ServerUtil, new RouteMatch());

            response.RedirectToUrl("/uol/com/folha");
            Assert.AreEqual("/uol/com/folha", response.RedirectedTo);
        }