public void Count_SingleItem_ReturnsOne() { var rdd = new RequestDataDictionary(); rdd.Add("foobar", "baz"); Assert.AreEqual(1, rdd.Count); }
public void Clear_SingleItemAdded_SetsCountZero() { var rdd = new RequestDataDictionary(); rdd.Add("foobar", "baz"); rdd.Clear(); Assert.AreEqual(0, rdd.Count); }
public void ContainsKey_ItemAdded_ReturnsTrue() { var rdd = new RequestDataDictionary(); rdd.Add("foobar", "baz"); bool has_item = rdd.ContainsKey("foobar"); Assert.IsTrue(has_item); }
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); }
public void TryGetValue_NonMatchingValueAdded_ReturnsFalse() { var rdd = new RequestDataDictionary(); rdd.Add("blizbar", "baz"); string dummy; bool has_value = rdd.TryGetValue("foobar", out dummy); Assert.IsFalse(has_value); }
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); }
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); }
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 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); }
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); }
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); }
public void Clear_ItemInCollectionAndItemAdded_SetsCountZero() { var nvc = new DataDictionary(); var rdd = new RequestDataDictionary(); nvc.Add("foobar", "baz"); rdd.AddCollection(nvc); rdd.Add("foobar", "baz"); rdd.Clear(); Assert.AreEqual(0, rdd.Count); }
public void Clear_ItemInCollectionAndItemAdded_SetsCountZero() { var nvc = new DataDictionary (); var rdd = new RequestDataDictionary (); nvc.Add ("foobar", "baz"); rdd.AddCollection (nvc); rdd.Add ("foobar", "baz"); rdd.Clear (); Assert.AreEqual (0, rdd.Count); }
public void Clear_ItemInCollectionAndItemAdded_RemovesItem() { var nvc = new DataDictionary (); var rdd = new RequestDataDictionary (); nvc.Add ("foobar", "baz"); rdd.AddCollection (nvc); rdd.Add ("foobar", "baz"); rdd.Clear (); bool has_item = rdd.ContainsKey ("foobar"); Assert.IsFalse (has_item); }
public void Clear_ItemInCollectionAndItemAdded_RemovesItem() { var nvc = new DataDictionary(); var rdd = new RequestDataDictionary(); nvc.Add("foobar", "baz"); rdd.AddCollection(nvc); rdd.Add("foobar", "baz"); rdd.Clear(); bool has_item = rdd.ContainsKey("foobar"); Assert.IsFalse(has_item); }
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); }
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); }
public void TryGetValue_NonMatchingValueAdded_ReturnsFalse() { var rdd = new RequestDataDictionary (); rdd.Add ("blizbar", "baz"); string dummy; bool has_value = rdd.TryGetValue ("foobar", out dummy); Assert.IsFalse (has_value); }
public void Count_SingleItem_ReturnsOne() { var rdd = new RequestDataDictionary (); rdd.Add ("foobar", "baz"); 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_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); }
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); }
public void ContainsKey_ItemAdded_ReturnsTrue() { var rdd = new RequestDataDictionary (); rdd.Add ("foobar", "baz"); bool has_item = rdd.ContainsKey ("foobar"); Assert.IsTrue (has_item); }
public void Clear_SingleItemAdded_SetsCountZero() { var rdd = new RequestDataDictionary (); rdd.Add ("foobar", "baz"); rdd.Clear (); Assert.AreEqual (0, rdd.Count); }