示例#1
0
        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));
        }
示例#2
0
        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));
        }
示例#4
0
        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_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_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));
        }
示例#10
0
        public void CustomHttpHeadersCollection_Contains_NullPropertyThrows()
        {
            var properties = new CustomHttpHeadersCollection();

            properties.Contains((CustomHttpHeader)null);
        }
示例#11
0
        public void CustomHttpHeadersCollection_Contains_EmptyNameThrows()
        {
            var properties = new CustomHttpHeadersCollection();

            properties.Contains(String.Empty);
        }
示例#12
0
        public void CustomHttpHeadersCollection_Contains_NullNameThrows()
        {
            var properties = new CustomHttpHeadersCollection();

            properties.Contains((string)null);
        }