public void TestFoo() { Changer changer = new Changer(); PropertyChangedTester<Changer> tester = new PropertyChangedTester<Changer>(changer); tester.PropertyChanged(c => c.Text); }
public void CheckPropertyChanged() { GetStatuses(true); PropertyChangedTester<QueryResultsViewModel> tester = new PropertyChangedTester<QueryResultsViewModel>(this._vm); this._vm.SelectedTweet = this._vm.Tweets[0]; tester.PropertyChanged(v => v.SelectedTweet); }
public void SelectedTweetIsRetainedAfterRefresh() { _service.Setup(a => a.GetLatest()).Returns( CreateStatuses(1, 10).ToArray()); _refreshEvent.Object.Publish(true); _vm.SelectedTweet = _vm.Tweets[5]; Assert.That(_vm.SelectedTweet.Status.Id, Is.EqualTo(6)); _service.Setup(a => a.GetNewer(_vm.Tweets[0].Status)).Returns( CreateStatuses(3, 13).ToArray()); var tester = new PropertyChangedTester<QueryResultsViewModel>(_vm); _refreshEvent.Object.Publish(null); Assert.That(_vm.SelectedTweet.Status.Id, Is.EqualTo(6)); Assert.That(tester.PropertyChanged(p => p.SelectedTweet), Is.True); }
public void MoveUpRaisesPropertyChanged() { GetStatuses(); this._vm.SelectedTweet = this._vm.Tweets[1]; var tester = new PropertyChangedTester<QueryResultsViewModel>(this._vm); ExecuteMoveUp(); tester.PropertyChanged(v => v.SelectedTweet); }