static void Main(string[] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); CommandLineOptions options = new CommandLineOptions(); try { options.Parse(args); } catch (OptionException ex) { string msg = string.Format("{0} {1}", ex.Message, ex.OptionName); MessageBox.Show(msg, "NUnit - OptionException", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (options.ShowHelp) { ShowHelpText(options); return; } var testEngine = TestEngineActivator.CreateInstance(true); if (options.InternalTraceLevel != null) testEngine.InternalTraceLevel = (InternalTraceLevel)Enum.Parse(typeof(InternalTraceLevel), options.InternalTraceLevel); var model = new TestModel(testEngine, options); var form = new MainForm(); new MainPresenter(form, model); new ProgressBarPresenter(form.ProgressBarView, model); new TreeViewPresenter(form.TestTreeView, model); new StatusBarPresenter(form.StatusBarView, model); new TestPropertiesPresenter(form.PropertiesView, model); new XmlPresenter(form.XmlView, model); //new RecentFiles(settingsServiceServiceService._settings); //new RecentFilesPresenter(form, settingsServiceServiceService); try { Application.Run(form); } finally { testEngine.Dispose(); } }
public TestModel TestGetModel(string name) { TestModel test = new TestModel(); test.Name = name + "|TestOne"; return test; }