public void CustomHttpHeadersCollection_Count_ReturnsZeroAfterLastItemRemoved() { var properties = new CustomHttpHeadersCollection(); var prop = new CustomHttpHeader("TestHeader", "Test Value"); properties.Remove(prop); Assert.AreEqual(0, properties.Count); }
public void CustomHttpHeadersCollection_Remove_RemoveInstanceSucceeds() { var properties = new CustomHttpHeadersCollection(); var p = new CustomHttpHeader("TestProp1", "Test Value"); properties.Add(p); Assert.AreEqual(true, properties.Remove(p)); Assert.AreEqual(0, properties.Count); }
public void CustomHttpHeadersCollection_Remove_RemoveInstanceForDifferentInstanceWithSameKeyReturnsFalse() { var properties = new CustomHttpHeadersCollection(); var p = new CustomHttpHeader("TestProp1", "Test Value"); var p2 = new CustomHttpHeader("TestProp1", "Test Value"); properties.Add(p); Assert.AreEqual(false, properties.Remove(p2)); Assert.AreEqual(1, properties.Count); }
public void CustomHttpHeadersCollection_Remove_NullThrows() { var properties = new CustomHttpHeadersCollection(); properties.Remove((CustomHttpHeader)null); }
public void CustomHttpHeadersCollection_Remove_EmptyKeyThrows() { var properties = new CustomHttpHeadersCollection(); properties.Remove(String.Empty); }
public void CustomHttpHeadersCollection_Remove_NullKeyThrows() { var properties = new CustomHttpHeadersCollection(); properties.Remove((string)null); }