// TODO: Use an interface for view public TestCentricPresenter(IMainView view, ITestModel model, CommandLineOptions options) { _view = view; _model = model; _options = options; _settings = _model.Settings; _recentFiles = _model.RecentFiles; _runtimeSelectionController = new RuntimeSelectionController(_view.RuntimeMenu, _model); _view.Font = _settings.Gui.Font; _view.ResultTabs.SelectedIndex = _settings.Gui.SelectedTab; UpdateViewCommands(); foreach (string format in _model.ResultFormats) { if (format != "cases" && format != "user") { _resultFormats.Add(format); } } WireUpEvents(); }
public void Initialize() { _menu = new PopupMenuElement(new ToolStripMenuItem("Runtimes")); _model = Substitute.For <ITestModel>(); _model.AvailableRuntimes.Returns(AvailableRuntimes); _package = new TestPackage("dummy.dll"); _controller = new RuntimeSelectionController(_menu, _model); }
public MainPresenter(IMainView view, ITestModel model, CommandLineOptions options) { _view = view; _model = model; _settings = _model.Settings; _options = options; _runtimeSelectionController = new RuntimeSelectionController(view.SelectRuntimeMenu, model); InitializeMainMenu(); WireUpEvents(); }