Example #1
0
 public override void RunBeforeEveryTest()
 {
     base.RunBeforeEveryTest();
     InitRootWithDir();
     _sutPresenter = new CDEWinFormPresenter(_mockForm, _stubConfig);
     InitRootWithFile();
 }
Example #2
0
            public override void RunBeforeEveryTest()
            {
                base.RunBeforeEveryTest();

                _stubConfig.Stub(x => x.DefaultDirectoryColumnCount)
                .Return(3);     // enough spaces for directory list view items.
                InitRootWithFile();
                _sutPresenter = new CDEWinFormPresenter(_mockForm, _stubConfig, null);
            }
Example #3
0
        // ReSharper restore LocalizableElement

        protected void MockTreeViewAfterSelect(CDEWinFormPresenter presenter)
        {
            _mockForm.Stub(x => x.DirectoryTreeViewSelectedNode = Arg <TreeNode> .Is.Anything)
            .WhenCalled(a =>
            {
                _treeViewAfterSelectNode = (TreeNode)a.Arguments[0];
                _mockForm.Stub(x => x.DirectoryTreeViewActiveAfterSelectNode)
                .Repeat.Times(1)
                .Return(_treeViewAfterSelectNode);
                presenter.DirectoryTreeViewAfterSelect();
            });
        }
Example #4
0
            public override void RunBeforeEveryTest()
            {
                base.RunBeforeEveryTest();

                _stubConfig.Stub(x => x.DefaultCatalogColumnCount)
                .Return(13);     // enough spaces for catalog list view items.
                _stubConfig.Stub(x => x.DateFormatYMDHMS)
                .Return("{0:yyyy/MM/dd HH:mm:ss}");

                InitRootWithFile();

                var _loadCatalogsService = MockRepository.GenerateStub <ILoadCatalogService>();

                _loadCatalogsService.Stub(x => x.LoadRootEntries(Arg <IConfig> .Is.Anything, Arg <TimeIt> .Is.Anything))
                .Return(_rootList);

                _sutPresenter = new CDEWinFormPresenter(_mockForm, _stubConfig, _loadCatalogsService);
            }