public void ContansName_ArgumentIsNull_ThrowsArgumentNullException()
        {
            // Arrange
            var headers = new HttpHeaderCollection(_initialHeaders);

            // Act & Assert
            var ex = Assert.Throws <ArgumentNullException>(() => headers.ContainsName(null));

            Assert.That(ex.ParamName, Is.EqualTo("name"));
        }
        public void ContansName_NameIsNotPresent_ReturnsFalse()
        {
            // Arrange
            var headers = new HttpHeaderCollection(_initialHeaders);

            // Act
            var contains = headers.ContainsName("Strange-Host");

            // Assert
            Assert.That(contains, Is.False);
        }
        public void op_ContainsName_Token_whenTrue()
        {
            var item = new HttpHeader("name", "value");
            var obj = new HttpHeaderCollection
                          {
                              item
                          };

            Assert.True(obj.ContainsName("name"));
        }
        public void op_ContainsName_Token_whenFalse()
        {
            var obj = new HttpHeaderCollection
                          {
                              new HttpHeader("foo", "value")
                          };

            Assert.False(obj.ContainsName("bar"));
        }
        public void op_ContainsName_TokenNull()
        {
            var obj = new HttpHeaderCollection
                          {
                              new HttpHeader("name", "foo")
                          };

            Assert.Throws<ArgumentNullException>(() => obj.ContainsName(null as string));
        }