public void SetUp()
 {
     mocks = new MockRepository();
     queryView = (IQueryView)mocks.CreateMock(typeof(IQueryView));
     mainPresenter = (IMainPresenter)mocks.CreateMock(typeof(IMainPresenter));
     SetupResult.On(mainPresenter).Call(mainPresenter.CurrentProject).Return(prj);
     QueryPresenterWithMockView.MockView = queryView;
     presenter = new QueryPresenterWithMockView(mainPresenter);
 }
        public void SetUp()
        {
            mocks = new MockRepository();
            queryView = mocks.CreateMock(typeof(IQueryView)) as IQueryView;

            parameters = new Hashtable();
            parameters["id"] = new TypedParameter("id",typeof(int),1);

            SetupResult.On(queryView).Call(queryView.Parameters).Return(parameters);

            QueryPresenterWithMockView.MockView = queryView;
            context = new QueryPresenterWithMockView(null);
        }
コード例 #3
0
 public QueryForm(IQueryPresenter presenter, IView parentView)
     : base(parentView)
 {
     this.presenter = presenter;
     InitializeComponent();
 }