示例#1
0
        public void FireEventFiresEventWithBasicArgs()
        {
            var vm = new ViewModelWithEvents();

            vm.MonitorEvents();
            vm.FireEventWithBasicArgs();
            vm.ShouldRaise("EventWithBasicArgs").WithArgs <MyEventArgs>(a => true);
        }
示例#2
0
        public void FireEventFiresEventWithBasicArgsAndReturnsArgs()
        {
            var vm = new ViewModelWithEvents();

            vm.EventWithBasicArgs += (s, e) => e.Passed = true;
            var retVal = vm.FireEventWithBasicArgs();

            retVal.Passed.Should().BeTrue();
        }