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

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

private Allow_ReadAndWriteProperty_ValueMatchesPriorSetValue ( ) : void
Результат void
        public void Allow_ReadAndWriteProperty_ValueMatchesPriorSetValue()
        {
            Assert.Equal(0, _headers.Allow.Count);

            _headers.Allow.Add("custom1");
            _headers.Allow.Add("custom2");

            Assert.Equal(2, _headers.Allow.Count);
            Assert.Equal(2, _headers.GetValues("Allow").Count());

            Assert.Equal("custom1", _headers.Allow.ElementAt(0));
            Assert.Equal("custom2", _headers.Allow.ElementAt(1));

            _headers.Allow.Clear();
            Assert.Equal(0, _headers.Allow.Count);
            Assert.False(_headers.Contains("Allow"));
        }
HttpContentHeadersTest