public void op_Contains_NameValueConfigurationElement()
        {
            var element = new RedirectionConfigurationElement<AbsoluteUri>("http://example.com/", "http://example.net/");
            var obj = new RedirectionConfigurationElementCollection<AbsoluteUri>
                          {
                              element
                          };

            Assert.True(obj.Contains(element));
        }
        public void op_Add_string_T()
        {
            var obj = new RedirectionConfigurationElementCollection<AbsoluteUri>
                          {
                              {
                                  "http://example.com/", "http://example.net/"
                              }
                          };

            Assert.Equal((AbsoluteUri)"http://example.com/", obj.First().From);
        }
        public void op_Clear()
        {
            var obj = new RedirectionConfigurationElementCollection<AbsoluteUri>
                          {
                              {
                                  "http://example.com/", "http://example.net/"
                              }
                          };

            Assert.NotEmpty(obj);
            obj.Clear();
            Assert.Empty(obj);
        }
        public void op_CopyTo_NameValueConfigurationElement_int()
        {
            var expected = new RedirectionConfigurationElement<AbsoluteUri>("http://example.com/", "http://example.net/");
            var obj = new RedirectionConfigurationElementCollection<AbsoluteUri>
                          {
                              expected,
                              new RedirectionConfigurationElement<AbsoluteUri>("http://example.org/", "http://example.co.uk/")
                          };

            var array = new RedirectionConfigurationElement<AbsoluteUri>[obj.Count];
            obj.CopyTo(array, 0);

            var actual = array.First();

            Assert.Equal(expected, actual);
        }
        public void prop_CollectionType_get()
        {
            const ConfigurationElementCollectionType expected = ConfigurationElementCollectionType.AddRemoveClearMap;
            var actual = new RedirectionConfigurationElementCollection<AbsoluteUri>().CollectionType;

            Assert.Equal(expected, actual);
        }
        public void op_Remove_NameValueConfigurationElement_whenEmpty()
        {
            var element = new RedirectionConfigurationElement<AbsoluteUri>("http://example.com/", "http://example.net/");
            var obj = new RedirectionConfigurationElementCollection<AbsoluteUri>();

            Assert.False(obj.Remove(element));
        }
        public void op_Remove_NameValueConfigurationElement()
        {
            var element = new RedirectionConfigurationElement<AbsoluteUri>("http://example.com/", "http://example.net/");
            var obj = new RedirectionConfigurationElementCollection<AbsoluteUri>
                          {
                              new RedirectionConfigurationElement<AbsoluteUri>("http://example.org/", "http://example.co.uk/"),
                              element
                          };

            Assert.True(obj.Remove(element));
            Assert.False(obj.Contains(element));
        }