Inheritance: IRequestBuilder
		public void Should_use_api_uri_provided_by_IApiUri_interface()
		{
			const string expectedApiUri = "http://api.7dizzle";

			var apiUri = A.Fake<IApiUri>();
			A.CallTo(() => apiUri.Uri).Returns(expectedApiUri);
			_requestBuilder = new RequestBuilder(apiUri, EssentialDependencyCheck<IOAuthCredentials>.Instance);

			var requestData = new RequestData
			{
				Endpoint = "test",
				HttpMethod = HttpMethod.Get,
				Headers = new Dictionary<string, string>()
			};

			var response = _requestBuilder.BuildRequest(requestData);

			Assert.That(response.Url, Is.StringStarting(expectedApiUri));
		}
		public void SetUp()
		{
			var appSettingsCredentials = new StubbedConsumerCreds();
			var apiUri = new ApiUri();
			_requestBuilder = new RequestBuilder(new RouteParamsSubstitutor(apiUri), appSettingsCredentials);
		}
		public void Setup()
		{
			_requestBuilder = new RequestBuilder(
				EssentialDependencyCheck<IApiUri>.Instance,
				EssentialDependencyCheck<IOAuthCredentials>.Instance);
		}
		public void SetUp()
		{
			var appSettingsCredentials = new StubbedConsumerCreds();
			var apiUri = new ApiUri();
			_requestBuilder = new RequestBuilder(apiUri, appSettingsCredentials);
		}
		public void Setup()
		{
			_requestBuilder = new RequestBuilder(
				new RouteParamsSubstitutor(new ApiUri()), 
				EssentialDependencyCheck<IOAuthCredentials>.Instance);
		}
		public void Post_data_with_requestBody_does_not_add_query_string_params()
		{
			var queryStringParameters = new Dictionary<string, string>();
			var requestData = new RequestData
			{
				HttpMethod = HttpMethod.Post,
				Payload = new RequestPayload("application/x-www-form-urlencoded", "foo=bar"),
				RequiresSignature = true
			};

			var credentials = A.Fake<IOAuthCredentials>();
			A.CallTo(() => credentials.ConsumerKey).Returns("MyKey");
			A.CallTo(() => credentials.ConsumerSecret).Returns("MySecret");

			var substitutor = A.Fake<IRouteParamsSubstitutor>();
			A.CallTo(() => substitutor.SubstituteParamsInRequest(requestData))
				.Returns(new ApiRequest
				{
					Parameters = queryStringParameters,
					AbsoluteUrl = "http://www.7digital.com"
				});

			_requestBuilder = new RequestBuilder(substitutor, credentials);
			_requestBuilder.BuildRequest(requestData);

			Assert.That(queryStringParameters.Count, Is.EqualTo(0), "Unexpected query string parameter");
		}