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

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

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

            case BuildComponentType.ResultsCache:
                return((IBuildComponent)this.resultsCache);

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

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

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

                case BuildComponentType.ResultsCache:
                    return (IBuildComponent)_resultsCache;

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