public Task Connect (NUnitVersion version, IExecutionHandler executionHandler = null, OperationConsole console = null)
		{
			var exePath = Path.Combine (Path.GetDirectoryName (GetType ().Assembly.Location), version.ToString (), "NUnitRunner.exe");
			connection = new RemoteProcessConnection (exePath, executionHandler, console, Runtime.MainSynchronizationContext);
			connection.AddListener (this);
			return connection.Connect ();
		}
示例#2
0
        public Task Connect(NUnitVersion version, IExecutionHandler executionHandler = null, OperationConsole console = null)
        {
            var exePath = Path.Combine(Path.GetDirectoryName(GetType().Assembly.Location), version.ToString(), "NUnitRunner.exe");

            connection = new RemoteProcessConnection(exePath, executionHandler, console, Runtime.MainSynchronizationContext);
            connection.AddListener(this);
            return(connection.Connect());
        }
示例#3
0
 public NUnitProjectTestSuite(DotNetProject project, NUnitVersion version) : base(project.Name, project)
 {
     NUnitVersion         = version;
     storeId              = Path.GetFileName(project.FileName);
     resultsPath          = UnitTestService.GetTestResultsDirectory(project.BaseDirectory);
     ResultsStore         = new BinaryResultsStore(resultsPath, storeId);
     this.project         = project;
     project.NameChanged += OnProjectRenamed;
     IdeApp.ProjectOperations.EndBuild += OnProjectBuilt;
 }
		public NUnitProjectTestSuite (DotNetProject project, NUnitVersion version): base (project.Name, project)
		{
			NUnitVersion = version;
			storeId = Path.GetFileName (project.FileName);
			resultsPath = UnitTestService.GetTestResultsDirectory (project.BaseDirectory);
			ResultsStore = new BinaryResultsStore (resultsPath, storeId);
			this.project = project;
			project.NameChanged += OnProjectRenamed;
			IdeApp.ProjectOperations.EndBuild += OnProjectBuilt;
		}
示例#5
0
        public string ConvertToString(NUnitVersion version)
        {
            switch (version)
            {
            case NUnitVersion.NUnit3:
                switch (_argType)
                {
                case DataType.TeamCity:
                    return("--teamcity");

                case DataType.Where:
                    return($"--where \"{_value}\"");

                case DataType.Workers:
                    return($"--workers={_value}");

                case DataType.Agents:
                    return($"--agents={_value}");

                case DataType.WorkingDirectory:
                    return($"--work={_value}");

                case DataType.Process:
                    return($"--process={_value}");

                case DataType.Explore:
                    return($"--explore={_value}");

                case DataType.TestList:
                    return($"--testlist={_value}");

                case DataType.Domain:
                    return($"--domain={_value}");

                case DataType.ListExtensions:
                    return("--list-extensions");

                case DataType.Encoding:
                    return($"--encoding={_value}");

                default:
                    throw new NotSupportedException(_argType.ToString());
                }

            default:
                throw new NotSupportedException(version.ToString());
            }
        }
        private Tuple <string, string> GetData(NUnitVersion version)
        {
            switch (version)
            {
            case NUnitVersion.NUnit3:
                switch (_envVariableType)
                {
                case DataType.TeamCity:
                    return(Tuple.Create("TEAMCITY_PROJECT_NAME", "Test"));

                default:
                    throw new NotSupportedException(this._envVariableType.ToString());
                }

            default:
                throw new NotSupportedException(version.ToString());
            }
        }
 public string GetValue(NUnitVersion version)
 {
     return(GetData(version).Item2);
 }
 public string GetName(NUnitVersion version)
 {
     return(GetData(version).Item1);
 }