public void CreateEmptyRequestHeaders_Success() { var headers = new AspNetRequestHeaders(new FakeHttpRequest()); #pragma warning disable xUnit2013 // Do not use equality check to check for collection size. Assert.Equal(0, headers.Count); Assert.Equal(0, headers.Count()); #pragma warning restore xUnit2013 // Do not use equality check to check for collection size. Assert.Empty(headers); }
public void CreateEmptyRequestHeaders_Success() { var headers = new AspNetRequestHeaders(new NameValueCollection()); Assert.Equal(0, headers.Count); Assert.Equal(0, headers.Count()); foreach (var header in headers) { // Should be empty Assert.True(false); } }
public void CreateEmptyRequestHeaders_Success() { var headers = new AspNetRequestHeaders(new FakeHttpRequest()); Assert.Equal(0, headers.Count); Assert.Equal(0, headers.Count()); foreach (var header in headers) { // Should be empty Assert.True(false); } }
public void AddHeaders_Success() { var headers = new AspNetRequestHeaders(new FakeHttpRequest()); headers.Add("content-length", new string[] { "a", "0" }); Assert.Equal(1, headers.Count); headers.Add("custom", new string[] { "ddfs", "adsfa" }); Assert.Equal(2, headers.Count); int count = 0; foreach (var header in headers) { count++; } Assert.Equal(2, count); }
public void AddHeaders_Success() { var headers = new AspNetRequestHeaders(new FakeHttpRequest()); headers.Add("content-length", new string[] { "a", "0" }); Assert.Equal(1, headers.Count); headers.Add("custom", new string[] { "ddfs", "adsfa" }); Assert.Equal(2, headers.Count); int count = 0; foreach (var header in headers) { count++; } Assert.Equal(2, count); }