public void DynamicProxy_Should_Map_Members_To_Given_Instance_When_Instance_Is_A_Dynamic_Type() { var dummy = new DummyClass("String Value"); dynamic proxy = new DynamicProxy(new DynamicProxy(new DynamicProxy(new DynamicProxy(dummy)))); const string things = "things"; dummy.WritableProperty = things; proxy.WritableProperty = things; Assert.AreEqual(dummy.WritableProperty, proxy.WritableProperty); Assert.AreEqual(dummy.ReadOnlyProperty, proxy.ReadOnlyProperty); Assert.AreEqual(dummy.ReadOnlyProperty.Length, proxy.ReadOnlyProperty.Length); Assert.IsTrue(proxy.Equals(dummy)); Assert.AreEqual(dummy.GetInt(12), proxy.GetInt(12)); Assert.AreEqual(dummy[1, 2], proxy[1, 2]); }