예제 #1
0
        public void TestSetViewModel()
        {
            DummyBinding binding = new DummyBinding();

            binding.ViewModel = new ViewModelBase <BindableBase> ();

            Assert.AreEqual(1, binding.viewModelBindCount);
            Assert.AreEqual(1, binding.viewBindCount);
        }
예제 #2
0
        public void TestUnbindViewInDispose()
        {
            var viewModel = new ViewModelBase <BindableBase> ();

            DummyBinding binding = new DummyBinding();

            binding.ViewModel = viewModel;
            binding.Dispose();

            Assert.AreEqual(0, binding.viewBindCount);
            Assert.AreEqual(0, binding.viewModelBindCount);
        }