Remove() публичный Метод

Removes the header with the specified name.
public Remove ( string headerName ) : bool
headerName string The name of the header to remove.
Результат bool
Пример #1
0
        public void Remove_WithInvalidName_ReturnsFalse()
        {
            var headers = new HttpHeaders();

            headers["abc"] = "123";
            Assert.IsFalse(headers.Remove("defg"));
        }
Пример #2
0
        public void Remove_WithValidNameDifferentCase_ReturnsTrue()
        {
            var headers = new HttpHeaders();

            headers["abc"] = "123";
            Assert.IsTrue(headers.Remove("ABC"));
        }
Пример #3
0
        public void Remove_WithValidName_RemoveFromList()
        {
            var headers = new HttpHeaders();

            headers["abc"] = "123";
            headers.Remove("abc");
            Assert.AreEqual(0, headers.Count);
        }
Пример #4
0
 public void Remove_WithValidName_ReturnsTrue()
 {
     var headers = new HttpHeaders();
     headers["abc"] = "123";
     Assert.IsTrue(headers.Remove("abc"));
 }
Пример #5
0
 public void Remove_WithValidName_RemoveFromList()
 {
     var headers = new HttpHeaders();
     headers["abc"] = "123";
     headers.Remove("abc");
     Assert.AreEqual(0, headers.Count);
 }
Пример #6
0
 public void Remove_WithInvalidName_ReturnsFalse()
 {
     var headers = new HttpHeaders();
     headers["abc"] = "123";
     Assert.IsFalse(headers.Remove("defg"));
 }