public void MutateSucceedsWithExtraMap() { FastExpando o = new FastExpando(); dynamic d = o; d["B"] = "goo"; o.Mutate(new Dictionary<string, string>() { { "A", "Z" } }); IDictionary<string, object> dict = o; Assert.IsFalse(dict.ContainsKey("A")); Assert.IsTrue(dict.ContainsKey("B")); }
public void MutateShouldModifyObject() { FastExpando o = new FastExpando(); dynamic d = o; d["A"] = "foo"; d["B"] = "goo"; o.Mutate(new Dictionary<string, string>() { { "A", "Z" } }); IDictionary<string, object> dict = o; Assert.IsFalse(dict.ContainsKey("A")); Assert.IsNotNull(d["B"]); Assert.AreEqual(d["Z"], "foo"); }
public void MutateSucceedsWithExtraMap() { FastExpando o = new FastExpando(); dynamic d = o; d["B"] = "goo"; o.Mutate(new Dictionary <string, string>() { { "A", "Z" } }); IDictionary <string, object> dict = o; Assert.IsFalse(dict.ContainsKey("A")); Assert.IsTrue(dict.ContainsKey("B")); }
public void MutateShouldModifyObject() { FastExpando o = new FastExpando(); dynamic d = o; d["A"] = "foo"; d["B"] = "goo"; o.Mutate(new Dictionary <string, string>() { { "A", "Z" } }); IDictionary <string, object> dict = o; Assert.IsFalse(dict.ContainsKey("A")); Assert.IsNotNull(d["B"]); Assert.AreEqual(d["Z"], "foo"); }