Esempio n. 1
0
        public void ItemCommand_Edit()
        {
            mock.Mockery mockery = new mock.Mockery();
            IProjectView mockView = (IProjectView)mockery.NewMock(typeof(IProjectView));

            DetailsViewCommandEventArgs e = this.GetDetailsViewCommandEventArgs(UpdateType.Update);
            // DetailsView dv = this.GetProjectDetails(UpdateType.Update);
            mock.Expect.Exactly(2).On(mockView).GetProperty("DataPath").Will(mock.Return.Value(this._DataPath));
            mock.Expect.Once.On(mockView).Method("DetailsFocus");

            ProjectPresenter presenter = new ProjectPresenter(mockView);
            presenter.ItemCommand(null, e);

            mockery.VerifyAllExpectationsHaveBeenMet();
        }