public void CustomHttpHeadersCollection_Contains_ReturnsTrueForExistingItem() { var properties = new CustomHttpHeadersCollection(); var prop = new CustomHttpHeader("TestHeader", "Test Value"); properties.Add(prop); Assert.AreEqual(true, properties.Contains(prop)); }
public void CustomHttpHeadersCollection_Contains_ReturnsFalseForNonExistentKey() { var properties = new CustomHttpHeadersCollection(); var prop = new CustomHttpHeader("TestHeader", "Test Value"); properties.Add(prop); Assert.AreEqual(false, properties.Contains("NotAValidKey")); }
public void CustomHttpHeadersCollection_Contains_ReturnsFalseForExistingKeyDifferentItem() { var properties = new CustomHttpHeadersCollection(); var prop = new CustomHttpHeader("TestHeader", "Test Value"); var prop2 = new CustomHttpHeader("TestHeader", "Test Value"); properties.Add(prop); Assert.AreEqual(false, properties.Contains(prop2)); }
public void CustomHttpHeadersCollection_Contains_NullPropertyThrows() { var properties = new CustomHttpHeadersCollection(); properties.Contains((CustomHttpHeader)null); }
public void CustomHttpHeadersCollection_Contains_NullNameThrows() { var properties = new CustomHttpHeadersCollection(); properties.Contains((string)null); }
public void CustomHttpHeadersCollection_Contains_EmptyNameThrows() { var properties = new CustomHttpHeadersCollection(); properties.Contains(String.Empty); }
public void CustomHttpHeadersCollection_Contains_ReturnsTrueForExistingKey() { var properties = new CustomHttpHeadersCollection(); var prop = new CustomHttpHeader("TestHeader", "Test Value"); properties.Add(prop); Assert.AreEqual(true, properties.Contains(prop.Name)); }