Esempio n. 1
0
        public void ConstructorTest()
        {
            Assert.Throws<ArgumentNullException>(() =>
                                                     {
                                                         Tester t = new Tester(null, null);
                                                     });

            Assert.DoesNotThrow(() =>
                                    {
                                        Tester t = new Tester();
                                    });
        }
Esempio n. 2
0
        protected void GenerateTestsClick(object CommandaBarControl,
            ref bool handled, ref bool cancelDefault)
        {
            if(m_NCrunchMenu == null)
            {m_NCrunchMenu =
                ((CommandBars)
                 _applicationObject.CommandBars)["NCrunch"];}
            //m_FinishedNCrunchSearch.Set();

            foreach (var selectedProject in this.GetSelectedProjects())
            {
              this._applicationObject.Solution.SolutionBuild.BuildProject(_applicationObject.Solution.SolutionBuild.ActiveConfiguration.Name,
                selectedProject.UniqueName, true);

              if (this._applicationObject.Solution.SolutionBuild.LastBuildInfo == 0)
              {
                  var testProject = this.AddTestProject(selectedProject);

                  var testAssembly = this.GetAssembly(selectedProject);

                  var tester = new Tester();

                  foreach (var type in testAssembly.GetTypes())
                  {
                      var testSuite = tester.GenerateTests(type);
                      AddTestSuiteToProject(testSuite, testProject);

                      //m_FinishedNCrunchSearch.WaitOne();
                      if (m_NCrunchMenu != null)
                      {
                          var disableCommand = m_NCrunchMenu.Controls["Disable"];
                          var enableCommand = m_NCrunchMenu.Controls["Enable"];

                              disableCommand.Execute();
                              enableCommand.Execute();

                      }
                  }
              }
            }
        }
Esempio n. 3
0
 public void Init()
 {
     m_Tester = new Tester();
 }