Beispiel #1
0
        public TestReporter(Service service, LaunchReporter launchNode, TestReporter parentTestNode)
        {
            _service        = service;
            _launchNode     = launchNode;
            _parentTestNode = parentTestNode;

            ThreadId = Thread.CurrentThread.ManagedThreadId;
        }
Beispiel #2
0
        public TestReporter StartNewTestNode(StartTestItemRequest request)
        {
            var newTestNode = new TestReporter(_service, _launchNode, this);

            newTestNode.Start(request);
            TestNodes.Add(newTestNode);

            _launchNode.LastTestNode = newTestNode;

            return(newTestNode);
        }
Beispiel #3
0
        private static TestReporter FindNonFinishedTestReporter(TestReporter testReporter, int threadId)
        {
            if (testReporter.FinishTask == null && !testReporter.TestNodes.Any() && testReporter.ThreadId == threadId)
            {
                return(testReporter);
            }

            return(testReporter.TestNodes
                   .Select(testNode => FindNonFinishedTestReporter(testNode, threadId))
                   .FirstOrDefault(t => t != null));
        }