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 ();
		}
Exemplo n.º 2
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());
            }
        }
Exemplo n.º 3
0
        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());
            }
        }
Exemplo n.º 4
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());
        }