public void DisplayName_WhenActionTitleChanges_RaisesPropertyChanged()
        {
            const string titleOfTheAction = "Title of the action";
            Mock<IAction> stubAction = AnAction.Called(titleOfTheAction).Mock();

            var test = new ProcessActionPresenter(stubAction.Object, x => new[] {_fakeProcessor.Object});

            test.AssertThatChangeNotificationIsRaisedBy(x => x.DisplayName).
                When(() => stubAction.Raise(x => x.PropertyChanged += null,
                                            new PropertyChangedEventArgs("Title")));
        }
        public void DisplayName_WhenActionTitleChanges_RaisesPropertyChanged()
        {
            const string   titleOfTheAction = "Title of the action";
            Mock <IAction> stubAction       = AnAction.Called(titleOfTheAction).Mock();

            var test = new ProcessActionPresenter(stubAction.Object, x => new[] { _fakeProcessor.Object });

            test.AssertThatChangeNotificationIsRaisedBy(x => x.DisplayName).
            When(() => stubAction.Raise(x => x.PropertyChanged += null,
                                        new PropertyChangedEventArgs("Title")));
        }