示例#1
0
        public void ContainsKey_NoItems_ReturnsFalse()
        {
            var rdd = new RequestDataDictionary();

            bool has_item = rdd.ContainsKey("foobar");

            Assert.IsFalse(has_item);
        }
示例#2
0
        public void Count_SingleItem_ReturnsOne()
        {
            var rdd = new RequestDataDictionary();

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

            Assert.AreEqual(1, rdd.Count);
        }
示例#3
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);
        }
示例#4
0
        public void TryGetValue_NoValuesAdded_ReturnsFalse()
        {
            var rdd = new RequestDataDictionary();

            string dummy;
            bool   has_value = rdd.TryGetValue("foobar", out dummy);

            Assert.IsFalse(has_value);
        }
示例#5
0
        public void Clear_SingleItemAdded_SetsCountZero()
        {
            var rdd = new RequestDataDictionary();

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

            Assert.AreEqual(0, rdd.Count);
        }
示例#6
0
        public void TryGetValue_NoValuesAdded_SetsValueNull()
        {
            var rdd = new RequestDataDictionary();

            string the_data;

            rdd.TryGetValue("foobar", out the_data);

            Assert.IsNull(the_data);
        }
示例#7
0
        public void ContainsKey_ItemAdded_ReturnsTrue()
        {
            var rdd = new RequestDataDictionary();

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

            bool has_item = rdd.ContainsKey("foobar");

            Assert.IsTrue(has_item);
        }
示例#8
0
        public void Count_SingleItemInCollection_ReturnsOne()
        {
            var nvc = new DataDictionary();
            var rdd = new RequestDataDictionary();

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

            Assert.AreEqual(1, rdd.Count);
        }
示例#9
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);
        }
示例#10
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);
        }
示例#11
0
        public void Clear_ItemInCollection_SetsCountZero()
        {
            var nvc = new DataDictionary ();
            var rdd = new RequestDataDictionary ();

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

            rdd.Clear ();
            Assert.AreEqual (0, rdd.Count);
        }
示例#12
0
        public void TryGetValue_SingleAddedValueMatches_ReturnsTrue()
        {
            var rdd = new RequestDataDictionary();

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

            string dummy;
            bool   has_value = rdd.TryGetValue("foobar", out dummy);

            Assert.IsTrue(has_value);
        }
示例#13
0
        public void Count_ItemInCollectionAndItemAdded_ReturnsTwo()
        {
            var nvc = new DataDictionary();
            var rdd = new RequestDataDictionary();

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

            Assert.AreEqual(2, rdd.Count);
        }
示例#14
0
        public void Clear_ItemInCollection_SetsCountZero()
        {
            var nvc = new DataDictionary();
            var rdd = new RequestDataDictionary();

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

            rdd.Clear();
            Assert.AreEqual(0, rdd.Count);
        }
示例#15
0
        public void Clear_SingleItemAdded_RemovesItem()
        {
            var rdd = new RequestDataDictionary ();

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

            string dummy;
            bool has_item = rdd.ContainsKey ("foobar");

            Assert.IsFalse (has_item);
        }
示例#16
0
        public void Clear_SingleItemAdded_RemovesItem()
        {
            var rdd = new RequestDataDictionary();

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

            string dummy;
            bool   has_item = rdd.ContainsKey("foobar");

            Assert.IsFalse(has_item);
        }
示例#17
0
        public void TryGetValue_SingleAddedValueMatches_SetsData()
        {
            var rdd = new RequestDataDictionary();

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

            string the_data;

            rdd.TryGetValue("foobar", out the_data);

            Assert.AreEqual("baz", the_data);
        }
示例#18
0
        public void ContainsKey_ItemInCollection_ReturnsTrue()
        {
            var nvc = new DataDictionary();
            var rdd = new RequestDataDictionary();

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

            bool has_item = rdd.ContainsKey("foobar");

            Assert.IsTrue(has_item);
        }
示例#19
0
        public void Clear_ItemInCollection_RemovesItem()
        {
            var nvc = new DataDictionary();
            var rdd = new RequestDataDictionary();

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

            rdd.Clear();

            bool has_item = rdd.ContainsKey("foobar");

            Assert.IsFalse(has_item);
        }
示例#20
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);
        }
示例#21
0
        public void Clear_ItemInCollection_RemovesItem()
        {
            var nvc = new DataDictionary ();
            var rdd = new RequestDataDictionary ();

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

            rdd.Clear ();

            bool has_item = rdd.ContainsKey ("foobar");

            Assert.IsFalse (has_item);
        }
示例#22
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);
        }
示例#23
0
        public void TryGetValue_SingleAddedValueMatches_ReturnsTrue()
        {
            var rdd = new RequestDataDictionary ();

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

            string dummy;
            bool has_value = rdd.TryGetValue ("foobar", out dummy);

            Assert.IsTrue (has_value);
        }
示例#24
0
        public void TryGetValue_NoValuesAdded_ReturnsFalse()
        {
            var rdd = new RequestDataDictionary ();

            string dummy;
            bool has_value = rdd.TryGetValue ("foobar", out dummy);

            Assert.IsFalse (has_value);
        }
示例#25
0
        public void TryGetValue_NoValuesAdded_SetsValueNull()
        {
            var rdd = new RequestDataDictionary ();

            string the_data;
            rdd.TryGetValue ("foobar", out the_data);

            Assert.IsNull (the_data);
        }
示例#26
0
        public void Count_SingleItemInCollection_ReturnsOne()
        {
            var nvc = new DataDictionary ();
            var rdd = new RequestDataDictionary ();

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

            Assert.AreEqual (1, rdd.Count);
        }
示例#27
0
        public void Count_SingleItem_ReturnsOne()
        {
            var rdd = new RequestDataDictionary ();

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

            Assert.AreEqual (1, rdd.Count);
        }
示例#28
0
        public void ContainsKey_ItemAdded_ReturnsTrue()
        {
            var rdd = new RequestDataDictionary ();

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

            bool has_item = rdd.ContainsKey ("foobar");
            Assert.IsTrue (has_item);
        }
示例#29
0
        public void Count_NoItems_ReturnsZero()
        {
            var rdd = new RequestDataDictionary ();

            Assert.AreEqual (0, rdd.Count);
        }
示例#30
0
        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);
        }
示例#31
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);
        }
示例#32
0
        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);
        }
示例#33
0
        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);
        }
示例#34
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);
        }
示例#35
0
        public void Count_NoItems_ReturnsZero()
        {
            var rdd = new RequestDataDictionary();

            Assert.AreEqual(0, rdd.Count);
        }
示例#36
0
        public void ContainsKey_ItemInCollection_ReturnsTrue()
        {
            var nvc = new DataDictionary ();
            var rdd = new RequestDataDictionary ();

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

            bool has_item = rdd.ContainsKey ("foobar");
            Assert.IsTrue (has_item);
        }
示例#37
0
        public void TryGetValue_SingleAddedValueMatches_SetsData()
        {
            var rdd = new RequestDataDictionary ();

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

            string the_data;
            rdd.TryGetValue ("foobar", out the_data);

            Assert.AreEqual ("baz", the_data);
        }
示例#38
0
        public void Count_ItemInCollectionAndItemAdded_ReturnsTwo()
        {
            var nvc = new DataDictionary ();
            var rdd = new RequestDataDictionary ();

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

            Assert.AreEqual (2, rdd.Count);
        }
示例#39
0
        public void ContainsKey_NoItems_ReturnsFalse()
        {
            var rdd = new RequestDataDictionary ();

            bool has_item = rdd.ContainsKey ("foobar");
            Assert.IsFalse (has_item);
        }
示例#40
0
        public void Clear_SingleItemAdded_SetsCountZero()
        {
            var rdd = new RequestDataDictionary ();

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

            Assert.AreEqual (0, rdd.Count);
        }