예제 #1
0
        public void can_cast_to_simple_property()
        {
            var target = new TargetSimplistProperty();
            var proxy  = Duck.Cast <ISimplistProperty>(target);

            proxy.Value = 2;
            Assert.AreEqual(2, target.Value);
        }
예제 #2
0
        public void can_cast_to_simple_generic_interface_with_property()
        {
            var target = new TargetSimplistProperty();
            var proxy  = Duck.Cast <ISimplistProperty <int> >(target);

            proxy.Value = 2;
            Assert.AreEqual(2, target.Value);
        }
예제 #3
0
        public static void can_cast_to_simple_property(Test t)
        {
            var target = new TargetSimplistProperty();
            var proxy  = Duck.Cast <ISimplistProperty>(target);

            proxy.Value = 2;
            t.Assert(2, target.Value);
        }