Пример #1
0
        public void FireEventFiresEventWithBasicArgs()
        {
            var vm = new ViewModelWithEvents();

            vm.MonitorEvents();
            vm.FireEventWithBasicArgs();
            vm.ShouldRaise("EventWithBasicArgs").WithArgs <MyEventArgs>(a => true);
        }
Пример #2
0
        public void FireEventFiresEventWithParameterisedArgsPassedByValue()
        {
            var vm = new ViewModelWithEvents();

            vm.MonitorEvents();
            vm.FireEventWithStringArgsPassingValue("HelloWorld");
            vm.ShouldRaise("EventWithStringArgs").WithArgs <EventArgs <string> >(a => a.Value == "HelloWorld");
        }
Пример #3
0
        public void FireEventFiresEventWithNoArgs()
        {
            var vm = new ViewModelWithEvents();

            vm.MonitorEvents();
            vm.FireEventWithNoArgs();
            vm.ShouldRaise("EventWithNoArgs").WithArgs <EventArgs>(a => a == EventArgs.Empty);
        }