public void FireEventFiresEventWithParameterisedArgs() { var vm = new ViewModelWithEvents(); vm.MonitorEvents(); vm.FireEventWithStringArgs("HelloWorld"); vm.ShouldRaise("EventWithStringArgs").WithArgs <EventArgs <string> >(a => a.Value == "HelloWorld"); }
public void FireEventFiresEventWithParameterisedArgsAndReturnsArgs() { var vm = new ViewModelWithEvents(); vm.EventWithStringArgs += (s, e) => e.Value = "FooBar"; var args = vm.FireEventWithStringArgs("HelloWorld"); args.Value.Should().Be("FooBar"); }