System.Net.Http.Tests.HttpContentHeadersTest.ContentLocation_UseAddMethod_AddedValueCanBeRetrievedUsingProperty C# (CSharp) Method

ContentLocation_UseAddMethod_AddedValueCanBeRetrievedUsingProperty() private method

        public void ContentLocation_UseAddMethod_AddedValueCanBeRetrievedUsingProperty()
        {
            _headers.TryAddWithoutValidation("Content-Location", "  http://www.example.com/path/?q=v  ");
            Assert.Equal(new Uri("http://www.example.com/path/?q=v"), _headers.ContentLocation);

            _headers.Clear();
            _headers.TryAddWithoutValidation("Content-Location", "/relative/uri/");
            Assert.Equal(new Uri("/relative/uri/", UriKind.Relative), _headers.ContentLocation);
        }
HttpContentHeadersTest