public void ShouldSetStartingDirectory()
        {
            var pathSelectorView = MockRepository.GenerateStub<IPathSelectorView>();
            pathSelectorView.Stub(view => view.Display()).Return(StartingDir);
            var presenter = new InitialPathSelectrorPresenter(pathSelectorView);
            pathSelectorView.Raise(selectorView => selectorView.OnSetInitialPath += null, this, new EventArgs());

            Assert.That(presenter.StartingPath, Is.EqualTo("blah"));
        }
예제 #2
0
파일: Form1.cs 프로젝트: avylov/duplicates
        private void Initialize()
        {
            var uiThreadMarshaller = new UIThreadMarshaller(SynchronizationContext.Current);
            var hashCalculator = radioButtonMd5.Checked
                                     ? (IChecksumCalculator) new MD5HashCalculator()
                                     : new Sha256HashCalculator();

            _listBuilderServiceService = new ListBuilderService(hashCalculator, uiThreadMarshaller);
            var mainThreadInvoker = new MainThreadInvoker(SynchronizationContext.Current);
            new FileListBuilderPresenter(this, _listBuilderServiceService, new FileRetrieverServiceService(mainThreadInvoker, new FileInfoImplemantation()),uiThreadMarshaller);
            _initialPathSelectrorPresenter = new InitialPathSelectrorPresenter(this);
        }