public void IsBusyDoesntRaisePropertyChangeIfTheValueDoesntChange() { var vm = new ViewModelWithEvents(); vm.MonitorEvents(); vm.IsBusy = false; vm.ShouldNotRaisePropertyChangeFor(v => v.IsBusy); }
public void FireEventFiresEventWithBasicArgs() { var vm = new ViewModelWithEvents(); vm.MonitorEvents(); vm.FireEventWithBasicArgs(); vm.ShouldRaise("EventWithBasicArgs").WithArgs <MyEventArgs>(a => true); }
public void FireEventFiresEventWithParameterisedArgsPassedByValue() { var vm = new ViewModelWithEvents(); vm.MonitorEvents(); vm.FireEventWithStringArgsPassingValue("HelloWorld"); vm.ShouldRaise("EventWithStringArgs").WithArgs <EventArgs <string> >(a => a.Value == "HelloWorld"); }
public void FireEventFiresEventWithNoArgs() { var vm = new ViewModelWithEvents(); vm.MonitorEvents(); vm.FireEventWithNoArgs(); vm.ShouldRaise("EventWithNoArgs").WithArgs <EventArgs>(a => a == EventArgs.Empty); }
public async Task BusyIndicatorRaisesPropertyChangeAfterRunAction() { var vm = new ViewModelWithEvents(); #pragma warning disable 1998 await vm.RunWithBusyIndicatorAsync(async() => vm.MonitorEvents()); #pragma warning restore 1998 vm.ShouldRaisePropertyChangeFor(v => v.IsBusy); }