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")); }
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); }