public void AddAssembly()
 {
     nUnitPresenterArxNet = NewPresenter(false);
     nUnitPresenterArxNet.NewProject();
     nUnitPresenterArxNet.AddAssembly();
     TestLoaderArxNet loader = UnitTestHelper.GetNonPublicField(nUnitPresenterArxNet, "loader") as TestLoaderArxNet;
     ProjectConfig config = loader.TestProject.ActiveConfig;
     if (config.Assemblies !=null && config.Assemblies.Count > 0)
     {
         string assembly = config.Assemblies[config.Assemblies.Count - 1];
         CADApplication.ShowAlertDialog("添加的程序集为:" + assembly);
     }
     else
         CADApplication.ShowAlertDialog("没添加程序集!");
 }
 public void AddAssembly_form_loader_null()
 {
     nUnitPresenterArxNet = NewPresenter(true);
     nUnitPresenterArxNet.AddAssembly();
 }
 public void SaveProjectIfDirty()
 {
     nUnitPresenterArxNet = NewPresenter(false);
     nUnitPresenterArxNet.NewProject();
     nUnitPresenterArxNet.AddAssembly();
     DialogResult result = (DialogResult)UnitTestHelper.CallNonPublicMethod(nUnitPresenterArxNet, "SaveProjectIfDirty", null);
     CADApplication.ShowAlertDialog("DialogResult:" + result);
 }
        public void SaveLastResult()
        {
            nUnitPresenterArxNet = NewPresenter(false);
            nUnitPresenterArxNet.NewProject();
            nUnitPresenterArxNet.AddAssembly();
            TestLoaderArxNet loader = UnitTestHelper.GetNonPublicField(nUnitPresenterArxNet, "loader") as TestLoaderArxNet;
            loader.LoadTest();
            loader.RunTests();

            nUnitPresenterArxNet.SaveLastResult();
        }
 public void EditProject()
 {
     nUnitPresenterArxNet = NewPresenter(false);
     nUnitPresenterArxNet.NewProject();
     nUnitPresenterArxNet.AddAssembly();
     nUnitPresenterArxNet.EditProject();
 }
 public void CloseProject()
 {
     nUnitPresenterArxNet = NewPresenter(false);
     nUnitPresenterArxNet.NewProject();
     nUnitPresenterArxNet.AddAssembly();
     DialogResult result = (DialogResult)nUnitPresenterArxNet.CloseProject();
     CADApplication.ShowAlertDialog("DialogResult:" + result);
 }