예제 #1
0
 public void CanGet_NameVAlueCollection()
 {
     Url u = new Url("/hello.aspx?something=someotherthing");
     var q = u.GetQueryNameValues()["something"];
     Assert.That(q, Is.EqualTo("someotherthing"));
 }
예제 #2
0
		public void CreatePost(Url url, string contentType, string input, NameValueCollection queries = null, string pathInfo = null)
		{
			httpMethod = "POST";
			rawUrl = url;
			this.pathInfo = pathInfo;
			query = queries ?? url.GetQueryNameValues();
			ContentType = contentType;
			this.input = input;
			contentLength = input.Length;
		}