public OpenCoverApplication(
			ProcessStartInfo targetProcessStartInfo,
			OpenCoverSettings settings,
			IProject project)
			: this(null, targetProcessStartInfo, settings, project)
		{
		}
		private void SavePartCoverSettings()
		{
			OpenCoverSettings settings = new OpenCoverSettings();
			settings.Include.AddRange(MakeStringArray(includeListTextBox.Text));
			settings.Exclude.AddRange(MakeStringArray(excludeListTextBox.Text));
			settings.Save(OpenCoverSettings.GetFileName(base.Project));
		}
		void SavePartCoverSettings()
		{
			OpenCoverSettings settings = new OpenCoverSettings();
			settings.Include.AddRange(RemoveEmptyStrings(includeListTextBox.Lines));
			settings.Exclude.AddRange(RemoveEmptyStrings(excludeListTextBox.Lines));
			settings.Save(OpenCoverSettings.GetFileName(project));
		}
 public OpenCoverApplication(
     ProcessStartInfo targetProcessStartInfo,
     OpenCoverSettings settings,
     IProject project)
     : this(null, targetProcessStartInfo, settings, project)
 {
 }
Ejemplo n.º 5
0
        private void SavePartCoverSettings()
        {
            OpenCoverSettings settings = new OpenCoverSettings();

            settings.Include.AddRange(MakeStringArray(includeListTextBox.Text));
            settings.Exclude.AddRange(MakeStringArray(excludeListTextBox.Text));
            settings.Save(OpenCoverSettings.GetFileName(base.Project));
        }
        void SavePartCoverSettings()
        {
            OpenCoverSettings settings = new OpenCoverSettings();

            settings.Include.AddRange(RemoveEmptyStrings(includeListTextBox.Lines));
            settings.Exclude.AddRange(RemoveEmptyStrings(excludeListTextBox.Lines));
            settings.Save(OpenCoverSettings.GetFileName(project));
        }
		public void SetUpFixture()
		{
			string xml = "<OpenCoverSettings>\r\n" +
						"   <Rule/>\r\n" +
						"   <Rule></Rule>\r\n" +
						"</OpenCoverSettings>";
			
			settings = new OpenCoverSettings(new StringReader(xml));
		}
		void ReadPartCoverSettings()
		{
			string settingsFileName = OpenCoverSettings.GetFileName(project);
			if (File.Exists(settingsFileName)) {
				OpenCoverSettings settings = new OpenCoverSettings(settingsFileName);
				includeListTextBox.Text = ConvertToMultLineString(settings.Include);
				excludeListTextBox.Text = ConvertToMultLineString(settings.Exclude);
			}
		}
Ejemplo n.º 9
0
        public OpenCoverSettings CreateOpenCoverSettings(IProject project)
        {
            string fileName = OpenCoverSettings.GetFileName(project);

            if (fileSystem.FileExists(fileName))
            {
                return(CreateOpenCoverSettingsFromFile(fileName));
            }
            return(new OpenCoverSettings());
        }
Ejemplo n.º 10
0
		void CreateOpenCoverApplication(string fileName)
		{
			CreateNUnitConsoleApplication();
			openCoverSettings = new OpenCoverSettings();
			openCoverApp = new OpenCoverApplication(
				fileName,
				nunitConsoleApp.GetProcessStartInfo(),
				openCoverSettings,
				project);
		}
        OpenCoverApplication CreateOpenCoverApplication(ProcessStartInfo startInfo, IEnumerable <ITest> tests)
        {
            IProject          project  = tests.First().ParentProject.Project;
            OpenCoverSettings settings = settingsFactory.CreateOpenCoverSettings(project);
            var application            = new OpenCoverApplication(startInfo, settings, project);

            RemoveExistingCodeCoverageResultsFile(application.CodeCoverageResultsFileName);
            CreateDirectoryForCodeCoverageResultsFile(application.CodeCoverageResultsFileName);
            return(application);
        }
        void CreatePartCoverApplication(SelectedTests selectedTests)
        {
            NUnitConsoleApplication nunitConsoleApp = new NUnitConsoleApplication(selectedTests, options);

            nunitConsoleApp.Results = base.TestResultsMonitor.FileName;

            OpenCoverSettings settings = settingsFactory.CreateOpenCoverSettings(selectedTests.Project);

            partCoverApplication = new OpenCoverApplication(nunitConsoleApp, settings);
        }
Ejemplo n.º 13
0
        public OpenCoverApplication(string fileName, NUnitConsoleApplication nunitConsoleApp, OpenCoverSettings settings)
        {
            this.fileName        = fileName;
            this.nunitConsoleApp = nunitConsoleApp;
            this.settings        = settings;

            if (String.IsNullOrEmpty(fileName))
            {
                GetPartCoverApplicationFileName();
            }
        }
        void ReadPartCoverSettings()
        {
            string settingsFileName = OpenCoverSettings.GetFileName(project);

            if (File.Exists(settingsFileName))
            {
                OpenCoverSettings settings = new OpenCoverSettings(settingsFileName);
                includeListTextBox.Text = ConvertToMultLineString(settings.Include);
                excludeListTextBox.Text = ConvertToMultLineString(settings.Exclude);
            }
        }
		public void Init()
		{
			settings = new OpenCoverSettings();
			settings.Include.Add("[a]*");
			settings.Include.Add("[b]*");
			settings.Exclude.Add("[c]*");
			settings.Exclude.Add("[d]*");
			savedSettingsXml = new StringBuilder();
			settings.Save(new StringWriter(savedSettingsXml));
			savedSettings = new OpenCoverSettings(new StringReader(savedSettingsXml.ToString()));

			doc = new XmlDocument();
			doc.LoadXml(savedSettingsXml.ToString());
		}
		public OpenCoverApplication(
			string fileName,
			ProcessStartInfo targetProcessStartInfo,
			OpenCoverSettings settings,
			IProject project)
		{
			this.fileName = fileName;
			this.targetProcessStartInfo = targetProcessStartInfo;
			this.settings = settings;
			this.project = project;
			
			if (String.IsNullOrEmpty(fileName)) {
				GetOpenCoverApplicationFileName();
			}
		}
        public OpenCoverApplication(
            string fileName,
            ProcessStartInfo targetProcessStartInfo,
            OpenCoverSettings settings,
            IProject project)
        {
            this.fileName = fileName;
            this.targetProcessStartInfo = targetProcessStartInfo;
            this.settings = settings;
            this.project  = project;

            if (String.IsNullOrEmpty(fileName))
            {
                GetOpenCoverApplicationFileName();
            }
        }
		void CreateOpenCoverSettingsFromFactory()
		{
			openCoverSettings = factory.CreateOpenCoverSettings(project);
		}
		void CreateOpenCoverApplication(string fileName)
		{
			CreateNUnitConsoleApplication();
			openCoverSettings = new OpenCoverSettings();
			openCoverApp = new OpenCoverApplication(fileName, nunitConsoleApp, openCoverSettings);
		}
		TextReader CreatePartCoverSettingsTextReader()
		{
			OpenCoverSettings settings = new OpenCoverSettings();
			settings.Include.Add("[MyTests]*");
			StringBuilder text = new StringBuilder();
			StringWriter writer = new StringWriter(text);
			settings.Save(writer);
			
			return new StringReader(text.ToString());
		}
Ejemplo n.º 21
0
 public OpenCoverApplication(NUnitConsoleApplication nunitConsoleApp, OpenCoverSettings settings)
     : this(null, nunitConsoleApp, settings)
 {
 }