Пример #1
0
        public void ExposeAttribute_ExposedPropertyAlreadyExistsOnViewModel()
        {
            var vm = new ExposingViewModelWithExistingProperty();

            // The FirstName property is manually registered on the VM. Let's check if
            // the ExposeAttribute implicitly sets the ViewModelToModelAttribute for this
            // property
            vm.FirstName = "test";

            Assert.AreEqual(vm.FirstName, vm.Person.FirstName);
        }
Пример #2
0
        public void ExposeAttribute_ExposedPropertyAlreadyExistsOnViewModel()
        {
            var vm = new ExposingViewModelWithExistingProperty();

            // The FirstName property is manually registered on the VM. Let's check if
            // the ExposeAttribute implicitly sets the ViewModelToModelAttribute for this
            // property
            vm.FirstName = "test";

            Assert.AreEqual(vm.FirstName, vm.Person.FirstName);
        }