示例#1
0
        public void Contains_NoItemsAdded_ReturnsFalse()
        {
            var rdd  = new RequestDataDictionary();
            var pair = new KeyValuePair <string, string> ("foobar", "baz");

            bool has_item = rdd.Contains(pair);

            Assert.IsFalse(has_item);
        }
示例#2
0
        public void Contains_ItemAddedKeyAndValueMatch_ReturnsTrue()
        {
            var rdd  = new RequestDataDictionary();
            var pair = new KeyValuePair <string, string> ("foobar", "baz");

            rdd.Add("foobar", "baz");

            bool has_item = rdd.Contains(pair);

            Assert.IsTrue(has_item);
        }
示例#3
0
        public void Contains_ItemAddedKeyDoesNotMatchValueDoes_ReturnsFalse()
        {
            var rdd  = new RequestDataDictionary();
            var pair = new KeyValuePair <string, string> ("foobar", "baz");

            rdd.Add("nope", "baz");

            bool has_item = rdd.Contains(pair);

            Assert.IsFalse(has_item);
        }
示例#4
0
        public void Contains_MultipleItemsInCollectionLastKeyAndValuesMatch_ReturnsTrue()
        {
            var nvc  = new DataDictionary();
            var rdd  = new RequestDataDictionary();
            var pair = new KeyValuePair <string, string> ("foobar", "baz");

            nvc.Add("foobar", "blah");
            nvc.Add("foobar", "baz");
            rdd.AddCollection(nvc);

            bool has_item = rdd.Contains(pair);

            Assert.IsTrue(has_item);
        }
示例#5
0
        public void Contains_MultipleItemsWithPartialEndMatchesInCollection_ReturnsFalse()
        {
            var nvc  = new DataDictionary();
            var rdd  = new RequestDataDictionary();
            var pair = new KeyValuePair <string, string> ("foobar", "baz");

            nvc.Add("foobar", "abaz");
            nvc.Add("foobar", "abaz");
            nvc.Add("foobar", "abaz");
            rdd.AddCollection(nvc);

            bool has_item = rdd.Contains(pair);

            Assert.IsFalse(has_item);
        }
        public void Contains_NoItemsAdded_ReturnsFalse()
        {
            var rdd = new RequestDataDictionary ();
            var pair = new KeyValuePair<string, string> ("foobar", "baz");

            bool has_item = rdd.Contains (pair);
            Assert.IsFalse (has_item);
        }
        public void Contains_MultipleItemsWithPartialStartMatchesInCollection_ReturnsFalse()
        {
            var nvc = new DataDictionary ();
            var rdd = new RequestDataDictionary ();
            var pair = new KeyValuePair<string,string> ("foobar", "baz");

            nvc.Add ("foobar", "baza");
            nvc.Add ("foobar", "baza");
            nvc.Add ("foobar", "baza");
            rdd.AddCollection (nvc);

            bool has_item = rdd.Contains (pair);
            Assert.IsFalse (has_item);
        }
        public void Contains_MultipleItemsInCollectionMiddleKeyAndValuesMatch_ReturnsTrue()
        {
            var nvc = new DataDictionary ();
            var rdd = new RequestDataDictionary ();
            var pair = new KeyValuePair<string,string> ("foobar", "baz");

            nvc.Add ("foobar", "blah");
            nvc.Add ("foobar", "baz");
            nvc.Add ("foobar", "burrah");
            rdd.AddCollection (nvc);

            bool has_item = rdd.Contains (pair);
            Assert.IsTrue (has_item);
        }
        public void Contains_ItemAddedKeyMatchesValueDoesnt_ReturnsFalse()
        {
            var rdd = new RequestDataDictionary ();
            var pair = new KeyValuePair<string, string> ("foobar", "baz");

            rdd.Add ("foobar", "nope");

            bool has_item = rdd.Contains (pair);
            Assert.IsFalse (has_item);
        }
示例#10
0
        public void Contains_ItemAddedKeyAndValueMatch_ReturnsTrue()
        {
            var rdd = new RequestDataDictionary ();
            var pair = new KeyValuePair<string, string> ("foobar", "baz");

            rdd.Add ("foobar", "baz");

            bool has_item = rdd.Contains (pair);
            Assert.IsTrue (has_item);
        }