Inheritance: INameValueCollection
        public void QueryString_Constructor_ItemsIsNull_ThrowsArgumentNullException()
        {
            //------------Setup for test--------------------------

            //------------Execute Test---------------------------
            var queryString = new QueryString(null);

            //------------Assert Results-------------------------
        }
        public void QueryString_GetEnumerator_ItemsEnumerator()
        {
            //------------Setup for test--------------------------
            var items = new List<KeyValuePair<string, string>> { new KeyValuePair<string, string>("key", "value") };

            var queryString = new QueryString(items);

            //------------Execute Test---------------------------
            var enumerator = queryString.GetEnumerator();

            //------------Assert Results-------------------------
            Assert.IsNotNull(enumerator);
            var count = 0;
            while(enumerator.MoveNext())
            {
                count++;
                var current = enumerator.Current;
                Assert.AreEqual(current.Key, "key");
                Assert.AreEqual(current.Value, "value");
            }
            Assert.AreEqual(1, count);
        }
        public void QueryString_IEnumerableGetEnumerator_ItemsEnumerator()
        {
            //------------Setup for test--------------------------
            var items = new List<KeyValuePair<string, string>> { new KeyValuePair<string, string>("key", "value") };

            var queryString = new QueryString(items);

            //------------Execute Test---------------------------
            var enumerator = ((IEnumerable)queryString).GetEnumerator();

            //------------Assert Results-------------------------
            Assert.IsNotNull(enumerator);
            var count = 0;
            while(enumerator.MoveNext())
            {
                count++;
                var current = enumerator.Current;
                Assert.IsInstanceOfType(current, typeof(KeyValuePair<string, string>));
                var kvp = (KeyValuePair<string, string>)current;
                Assert.AreEqual(kvp.Key, "key");
                Assert.AreEqual(kvp.Value, "value");
            }
            Assert.AreEqual(1, count);
        }
        public void QueryString_GetValues_KeyFound_ValuesForKey()
        {
            //------------Setup for test--------------------------
            var items = new List<KeyValuePair<string, string>> { new KeyValuePair<string, string>("key", "value1; value2") };

            var queryString = new QueryString(items);

            //------------Execute Test---------------------------
            var values = queryString.GetValues("key");

            //------------Assert Results-------------------------
            Assert.IsNotNull(values);
            var i = 1;
            foreach(var value in values)
            {
                Assert.AreEqual("value" + i++, value);
            }
        }
        public void QueryString_Item_KeyNotFound_EmptyString()
        {
            //------------Setup for test--------------------------
            var items = new List<KeyValuePair<string, string>> { new KeyValuePair<string, string>("key", "value1; value2") };

            var queryString = new QueryString(items);

            //------------Execute Test---------------------------
            var values = queryString["key1"];

            //------------Assert Results-------------------------
            Assert.AreEqual(string.Empty, values);
        }
        public void QueryString_Get_KeyFound_ValuesForKey()
        {
            //------------Setup for test--------------------------
            var items = new List<KeyValuePair<string, string>> { new KeyValuePair<string, string>("key", "value1; value2") };

            var queryString = new QueryString(items);

            //------------Execute Test---------------------------
            var values = queryString.Get("key");

            //------------Assert Results-------------------------
            Assert.AreEqual("value1; value2", values);
        }
        public void QueryString_GetValues_KeyNotFound_EmptyEnumerable()
        {
            //------------Setup for test--------------------------
            var items = new List<KeyValuePair<string, string>> { new KeyValuePair<string, string>("key", "value1; value2") };

            var queryString = new QueryString(items);

            //------------Execute Test---------------------------
            var values = queryString.GetValues("key1");

            //------------Assert Results-------------------------
            Assert.AreEqual(0, values.Count());
        }