Exemple #1
0
        /// <summary>
        /// Provides the components required by the tests
        /// </summary>
        internal IBuildComponent GetComponent(BuildComponentType type)
        {
            switch (type)
            {
            case BuildComponentType.RequestBuilder:
                QARequestBuilder requestBuilder = new QARequestBuilder();
                return((IBuildComponent)requestBuilder);

            case BuildComponentType.TaskBuilder:
                TaskBuilder taskBuilder = new TaskBuilder();
                return((IBuildComponent)taskBuilder);

            case BuildComponentType.TargetBuilder:
                TargetBuilder targetBuilder = new TargetBuilder();
                return((IBuildComponent)targetBuilder);

            case BuildComponentType.ResultsCache:
                return((IBuildComponent)_resultsCache);

            default:
                throw new ArgumentException("Unexpected type requested. Type = " + type.ToString());
            }
        }
        /// <summary>
        /// Provides the components required by the tests
        /// </summary>
        internal IBuildComponent GetComponent(BuildComponentType type)
        {
            switch (type)
            {
                case BuildComponentType.RequestBuilder:
                    QARequestBuilder requestBuilder = new QARequestBuilder();
                    return (IBuildComponent)requestBuilder;

                case BuildComponentType.TaskBuilder:
                    TaskBuilder taskBuilder = new TaskBuilder();
                    return (IBuildComponent)taskBuilder;

                case BuildComponentType.TargetBuilder:
                    TargetBuilder targetBuilder = new TargetBuilder();
                    return (IBuildComponent)targetBuilder;

                case BuildComponentType.ResultsCache:
                    return (IBuildComponent)_resultsCache;

                default:
                    throw new ArgumentException("Unexpected type requested. Type = " + type.ToString());
            }
        }