コード例 #1
0
        public void BuildRegionRequestMessage_returns_a_properly_configured_object()
        {
            const string ADDRESS = "http://tempuri.org";

            var inputUri = new Uri(ADDRESS);

            var component = new RequestFactory(inputUri);

            var actual = component.BuildRegionRequestMessage();

            var expectedUri = new Uri(ADDRESS + "/region");

            Assert.Equal(expectedUri, actual.RequestUri);
            Assert.Equal(HttpMethod.Get, actual.Method);
            Assert.Equal("2", string.Concat(actual.Headers.GetValues("x-api-version")));
        }