Exemplo n.º 1
0
        public void It_should_display_the_new_correct_name_in_the_view()
        {
            var viewModel = new ViewModel { Name = "Default" };
            var view = ViewMock.Observe(viewModel);

            viewModel.ChangeNameAndNotify("Notified Name");

            Assert.That(view.Property(vm => vm.Name), Is.EqualTo("Notified Name"));
        }
Exemplo n.º 2
0
        public void It_should_display_the_new_updated_name_in_the_view()
        {
            var viewModel = new ViewModel { Name = "Default" };
            var view = ViewMock.Observe(viewModel);

            viewModel.Name = "Notified Name";
            viewModel.NotifyWithEmptyString();

            Assert.That(view.Property(vm => vm.Name), Is.EqualTo("Notified Name"));
        }
Exemplo n.º 3
0
        public void Context()
        {
            var viewModel = new ViewModel { Name = "Default" };
            _view = ViewMock.Observe(viewModel);

            viewModel.Name = "Not Notified";
        }