AppHarbor.Test.Mocks.MockHttp.CreateGetResponse C# (CSharp) Method

CreateGetResponse() protected method

protected CreateGetResponse ( Uri url, HttpStatusCode statusCode, string fileName ) : HttpResponse
url System.Uri
statusCode HttpStatusCode
fileName string
return RestSharp.HttpResponse
		protected HttpResponse CreateGetResponse(Uri url, HttpStatusCode statusCode, string fileName)
		{
			var encoding = Encoding.UTF8;
			var content = File.ReadAllText(fileName, encoding);
			var response = new HttpResponse
			{
				ResponseUri = url,
				ContentEncoding = "UTF8",
				StatusCode = statusCode,
				ContentLength = content.Length,
				RawBytes = encoding.GetBytes(content),
				ContentType = "application/json",
			};

			return response;
		}