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); }
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); }
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); }
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); }
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); }
public void Contains_ItemInCollectionKeyAndValuesMatch_ReturnsTrue() { var nvc = new DataDictionary(); var rdd = new RequestDataDictionary(); var pair = new KeyValuePair <string, string> ("foobar", "baz"); nvc.Add("foobar", "baz"); rdd.AddCollection(nvc); bool has_item = rdd.Contains(pair); Assert.IsTrue(has_item); }
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); }
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); }
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 Count_SingleItemInCollection_ReturnsOne() { var nvc = new DataDictionary (); var rdd = new RequestDataDictionary (); nvc.Add ("foobar", "baz"); rdd.AddCollection (nvc); Assert.AreEqual (1, rdd.Count); }
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); }
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 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); }