コード例 #1
0
        private static IEnumerable <TestExecutionData> GetTestExecutionDataForGroup(
            XElement definition,
            Dictionary <string, ITestCase> prereqCasesDictionary,
            ITestCaseFactory testCaseFactory,
            IResourceManager resourceManager,
            TestCategory targetTestCategory)
        {
            IEnumerable <ITestCase> prereqs;
            IEnumerable <ITestCase> groupTestCases;

            testCaseFactory.GetTestCases(definition, prereqCasesDictionary, out prereqs, out groupTestCases, targetTestCategory);

            List <ITestCase> prereqList = prereqs.ToList();

            return(groupTestCases.Select(testcase =>
                                         new TestExecutionData(testcase, prereqList, resourceManager, (string)definition.Attribute("Name"))));
        }
コード例 #2
0
        /// <summary>
        /// Parses run configuration XML file to get ExecutionData.
        /// </summary>
        public static IEnumerable <TestExecutionData> ParseExecutionData(
            string filePath,
            IResourceManagerFactory resourceManagerFactory,
            ITestCaseFactory testCaseFactory,
            string testGroupName,
            TestCategory targetTestCategory)
        {
            XDocument xDoc = XDocument.Load(filePath);

            XElement         resourcesElement = xDoc.Root.Element("Resources");
            IResourceManager resourceManager  = resourceManagerFactory.GetResourceManager(resourcesElement);

            XElement prereqCasesElement = xDoc.Root.Element("PrereqCases") ?? new XElement("PrereqCases");
            IEnumerable <ITestCase>        prereqCases           = testCaseFactory.GetTestCases(prereqCasesElement, targetTestCategory);
            Dictionary <string, ITestCase> prereqCasesDictionary = prereqCases.ToDictionary(e => e.Name);

            return(xDoc.Root.Elements("TestGroup")
                   .SelectMany(x => GetTestExecutionDataForGroup(x, prereqCasesDictionary, testCaseFactory, resourceManager, targetTestCategory)));
        }
コード例 #3
0
 public VSTestWindowExtension(ITestExecutionRecorder executionRecorder, ITestCaseFactory testCaseFactory, ITestResultFactory testResultFactory)
 {
     this.executionRecorder = executionRecorder;
     this.testCaseFactory   = testCaseFactory;
     this.testResultFactory = testResultFactory;
 }
コード例 #4
0
 public TestRunner(ITestCaseFactory testCaseFactory, ITestResultFactory testResultFactory, TestProperty testIdProperty)
 {
     this.testCaseFactory   = testCaseFactory;
     this.testResultFactory = testResultFactory;
     this.testIdProperty    = testIdProperty;
 }
コード例 #5
0
 public TestExplorer(ITestCaseFactory testCaseFactory)
 {
     this.testCaseFactory = testCaseFactory;
 }
コード例 #6
0
 public TestExplorer(ITestCaseFactory testCaseFactory)
 {
     this.testCaseFactory = testCaseFactory;
 }
 public CachingTestCaseFactory(ITestCaseFactory testCaseFactory, TestProperty testIdProperty)
 {
     this.testCaseFactory = testCaseFactory;
     this.testIdProperty  = testIdProperty;
     testCases            = new KeyedMemoizer <string, TestCase>();
 }
コード例 #8
0
 public TestRunner(ITestCaseFactory testCaseFactory, ITestResultFactory testResultFactory, TestProperty testIdProperty)
 {
     this.testCaseFactory = testCaseFactory;
     this.testResultFactory = testResultFactory;
     this.testIdProperty = testIdProperty;
 }
コード例 #9
0
 public CachingTestCaseFactory(ITestCaseFactory testCaseFactory, TestProperty testIdProperty)
 {
     this.testCaseFactory = testCaseFactory;
     this.testIdProperty = testIdProperty;
     testCases = new KeyedMemoizer<string, TestCase>();
 }
コード例 #10
0
 public VSTestWindowExtension(ITestExecutionRecorder executionRecorder, ITestCaseFactory testCaseFactory, ITestResultFactory testResultFactory)
 {
     this.executionRecorder = executionRecorder;
     this.testCaseFactory = testCaseFactory;
     this.testResultFactory = testResultFactory;
 }