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