Example #1
0
        public void Can_Create_EditablePropertyChanged_Proxy_Type()
        {
            var proxy = (SimpleViewModel)DynamicProxyTool.CreateEditablePropertyChanged(typeof(SimpleViewModel));

            VerifyEditableObject(proxy);
            VerifyNotifyPropertyChanged(proxy);
        }
Example #2
0
        public void IsDynamicProxyType_Test()
        {
            var proxy = DynamicProxyTool.CreateNotifyPropertyChanged <SimpleViewModel>();

            proxy.GetType().IsDynamicProxyType().Should().Be.True();
            typeof(SimpleViewModel).IsDynamicProxyType().Should().Be.False();
        }
Example #3
0
        public void IsDynamicProxy_Test()
        {
            var proxy = DynamicProxyTool.CreateNotifyPropertyChanged <SimpleViewModel>();

            proxy.IsDynamicProxy().Should().Be.True();
            new SimpleViewModel().IsDynamicProxy().Should().Be.False();
        }
Example #4
0
        public void Can_Create_EditablePropertyChanged_Proxy_Generic()
        {
            var proxy = DynamicProxyTool.CreateEditablePropertyChanged <SimpleViewModel>();

            VerifyEditableObject(proxy);
            VerifyNotifyPropertyChanged(proxy);
        }
Example #5
0
        public void Can_Create_EditablePropertyChanged_Proxy_Factory()
        {
            var proxy =
                (SimpleViewModel)DynamicProxyTool.CreateEditablePropertyChanged(() => ActivatorTool.CreateInstance <SimpleViewModel>());

            VerifyEditableObject(proxy);
            VerifyNotifyPropertyChanged(proxy);
        }
Example #6
0
        public void Can_Create_EditableObject_Proxy_Generic()
        {
            var proxy = DynamicProxyTool.CreateEditableObject <SimpleViewModel>();

            VerifyEditableObject(proxy);
        }
Example #7
0
        public void Can_Create_EditableObject_Proxy_Type()
        {
            var proxy = (SimpleViewModel)DynamicProxyTool.CreateEditableObject(typeof(SimpleViewModel));

            VerifyEditableObject(proxy);
        }
Example #8
0
        public void Can_Create_NotifyPropertyChanged_Proxy_Factory()
        {
            var proxy = (SimpleViewModel)DynamicProxyTool.CreateNotifyPropertyChanged(() => new SimpleViewModel());

            VerifyNotifyPropertyChanged(proxy);
        }