Beispiel #1
0
        public void Constructor()
        {
            var vm = new AutoMapExceptViewModel();

            Assert.IsNotNull(vm);
            Assert.IsNotNull(vm.Data);
        }
Beispiel #2
0
        public void ReadTest()
        {
            var vm = new AutoMapExceptViewModel();

            Assert.AreEqual(vm.Data.Name, vm.GetValue("Name"));
            Assert.AreEqual(vm.Data.IsAdmin, vm.GetValue("IsAdmin"));
        }
Beispiel #3
0
        public void WriteTest()
        {
            var propertyChangedEventCount = 0;
            var vm = new AutoMapExceptViewModel();

            vm.PropertyChanged += (s, a) => propertyChangedEventCount++;

            vm.SetValue("Name", "TestOfficer");
            vm.SetValue("IsAdmin", false);

            Assert.AreEqual(2, propertyChangedEventCount);
            Assert.AreEqual("TestOfficer", vm.Data.Name);
            Assert.AreEqual(false, vm.Data.IsAdmin);
        }