예제 #1
0
        public void LocalBrowseClickedTest()
        {
            // Arrange
            var settings = new LegacyClientSettingsModel();

            settings.Path = "C:\\";
            // Act
            _folderBrowserView.Expect(x => x.SelectedPath = settings.Path);
            _folderBrowserView.Expect(x => x.ShowDialog(_settingsView)).Return(DialogResult.OK);
            _folderBrowserView.Expect(x => x.SelectedPath).Return("D:\\").Repeat.Twice();
            // Assert
            _presenter = CreatePresenter();
            _presenter.SettingsModel = settings;
            _presenter.LocalBrowseClicked();

            Assert.AreEqual("D:\\", settings.Path);

            _folderBrowserView.VerifyAllExpectations();
        }
        public void LocalBrowseClickedTest()
        {
            // Arrange
             var settings = new LegacyClientSettingsModel();
             settings.Path = "C:\\";
             // Act
             _folderBrowserView.Expect(x => x.SelectedPath = settings.Path);
             _folderBrowserView.Expect(x => x.ShowDialog(_settingsView)).Return(DialogResult.OK);
             _folderBrowserView.Expect(x => x.SelectedPath).Return("D:\\").Repeat.Twice();
             // Assert
             _presenter = CreatePresenter();
             _presenter.SettingsModel = settings;
             _presenter.LocalBrowseClicked();

             Assert.AreEqual("D:\\", settings.Path);

             _folderBrowserView.VerifyAllExpectations();
        }