public void TestSetViewModel() { DummyBinding binding = new DummyBinding(); binding.ViewModel = new ViewModelBase <BindableBase> (); Assert.AreEqual(1, binding.viewModelBindCount); Assert.AreEqual(1, binding.viewBindCount); }
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); }