public DigestView(DigestViewModel vm, IEventAggregator eventAggregator) { _vm = vm; _eventAggregator = eventAggregator; InitializeComponent(); _vm.PropertyChanged += CreateChart; Loaded += (s, e) => DataContext = _vm; }
public void Setup() { _kataFinishedEvent = new KataFinishedEvent(); var eventAggregator = MockRepository.GenerateStub<IEventAggregator>(); eventAggregator.Stub(x => x.GetEvent<KataFinishedEvent>()).Return(_kataFinishedEvent); var session = MockRepository.GenerateStub<ISession>(); _target = new DigestViewModel(eventAggregator, session); }