public void ToExpando_FromOneAnonymousType() { var o = DS.Expando( new { ID = 1, Name = "Fred" } ); Assert.AreEqual(1, o.ID); Assert.AreEqual("Fred", o.Name); }
public void ToExpando_OneObject2PropertiesDefinedAsString() { var o = DS.Expando( "ID", 1, "Name", "Fred" ); Assert.AreEqual(1, o.ID); Assert.AreEqual("Fred", o.Name); }
public void ToExpando_FromTwoAnonymousType() { var o = DS.Expando( new { ID = 1, Name = "Fred" }, new { Age = 45, Country = "FR" } ); Assert.AreEqual(1, o.ID); Assert.AreEqual("Fred", o.Name); Assert.AreEqual(45, o.Age); Assert.AreEqual("FR", o.Country); }