public void CanLoadMore() { PropertyChangedEventArgs updated = null; var vm = new DarkViewModel(); vm.PropertyChanged += (sender, args) => { updated = args; }; vm.CanLoadMore = false; Assert.NotNull(updated); Assert.Equal(nameof(vm.CanLoadMore), updated.PropertyName); }
public void IsBusy() { PropertyChangedEventArgs updated = null; var vm = new DarkViewModel(); vm.PropertyChanged += (sender, args) => { if (args.PropertyName == "IsBusy") { updated = args; } }; vm.IsBusy = true; Assert.NotNull(updated); Assert.Equal(nameof(vm.IsBusy), updated.PropertyName); Assert.False(vm.IsNotBusy); }