public void InformalPropTest() { dynamic tNew = new ExpandoObject(); tNew.Prop1 = "Test"; tNew.Prop2 = 42L; var tActsLike = Impromptu.ActLikeProperties(tNew, new Dictionary <string, Type>() { { "Prop1", typeof(string) } }); Assert.AreEqual(tNew.Prop1, tActsLike.Prop1); AssertException <RuntimeBinderException>(() => { var tTest = tActsLike.Prop2; }); }