Пример #1
0
        public void NonPublicStructAbstractProxyTest()
        {
            PrivateStruct        instance = default;
            AbstractPrivateProxy proxy    = instance.DuckCast <AbstractPrivateProxy>();

            Assert.Equal(instance.Value, proxy.Value);
        }
Пример #2
0
        public void NonPublicStructAbstractProxyTest()
        {
            PrivateStruct        instance = default;
            AbstractPrivateProxy proxy    = instance.DuckCast <AbstractPrivateProxy>();

            Assert.Equal((int)instance.Value, (int)proxy.Value);
            Assert.Equal(ValuesDuckType.Third.ToString(), proxy.GetValue());
            Assert.Equal(ValuesDuckType.Third.ToString(), ((IGetValue)proxy).GetValueProp);
        }