public void Import() { var bean = new Bean(); bean["a"] = 1; bean["b"] = 1; bean["c"] = 1; var data = new Dictionary<string, object> { { "b", 2 }, { "c", null } }; bean.Import(data); Assert.Equal(1, bean["a"]); Assert.Equal(2, bean["b"]); Assert.Equal(null, bean["c"]); data["b"] = "changed"; Assert.Equal(2, bean["b"]); }
public void Import() { var bean = new Bean(); bean["a"] = 1; bean["b"] = 1; bean["c"] = 1; var data = new Dictionary <string, object> { { "b", 2 }, { "c", null } }; bean.Import(data); Assert.Equal(1, bean["a"]); Assert.Equal(2, bean["b"]); Assert.Equal(null, bean["c"]); data["b"] = "changed"; Assert.Equal(2, bean["b"]); }