System.Net.Http.Tests.HttpContentHeadersTest.ContentType_UseAddMethod_AddedValueCanBeRetrievedUsingProperty C# (CSharp) Метод

ContentType_UseAddMethod_AddedValueCanBeRetrievedUsingProperty() приватный Метод

private ContentType_UseAddMethod_AddedValueCanBeRetrievedUsingProperty ( ) : void
Результат void
        public void ContentType_UseAddMethod_AddedValueCanBeRetrievedUsingProperty()
        {
            _headers.TryAddWithoutValidation("Content-Type", "text/plain; charset=utf-8; custom=value");

            MediaTypeHeaderValue value = new MediaTypeHeaderValue("text/plain");
            value.CharSet = "utf-8";
            value.Parameters.Add(new NameValueHeaderValue("custom", "value"));

            Assert.Equal(value, _headers.ContentType);
        }
HttpContentHeadersTest