public void TransformSucceedsWithExtraMap() { FastExpando o = new FastExpando(); FastExpando other = o.Transform(new Dictionary<string, string>() { { "A", "Z" } }); IDictionary<string, object> otherDict = other; Assert.AreNotSame(o, other); Assert.IsFalse(otherDict.ContainsKey("A")); Assert.IsFalse(otherDict.ContainsKey("Z")); }
public void TransformSucceedsWithExtraMap() { FastExpando o = new FastExpando(); FastExpando other = o.Transform(new Dictionary <string, string>() { { "A", "Z" } }); IDictionary <string, object> otherDict = other; Assert.AreNotSame(o, other); Assert.IsFalse(otherDict.ContainsKey("A")); Assert.IsFalse(otherDict.ContainsKey("Z")); }
public void TransformShouldCreateANewObject() { FastExpando o = new FastExpando(); dynamic d = o; d["A"] = "foo"; d["B"] = "goo"; FastExpando other = o.Transform(new Dictionary<string, string>() { { "A", "Z" } }); IDictionary<string, object> otherDict = other; dynamic otherD = other; Assert.AreNotSame(o, other); Assert.IsFalse(otherDict.ContainsKey("A")); Assert.IsNotNull(otherD["B"]); Assert.AreEqual(otherD["Z"], d["A"]); }
public void TransformShouldCreateANewObject() { FastExpando o = new FastExpando(); dynamic d = o; d["A"] = "foo"; d["B"] = "goo"; FastExpando other = o.Transform(new Dictionary <string, string>() { { "A", "Z" } }); IDictionary <string, object> otherDict = other; dynamic otherD = other; Assert.AreNotSame(o, other); Assert.IsFalse(otherDict.ContainsKey("A")); Assert.IsNotNull(otherD["B"]); Assert.AreEqual(otherD["Z"], d["A"]); }