Esempio n. 1
0
        private void SendExistingTestCases()
        {
            if (testCaseBatch.Count == 0)
            {
                return;
            }

            var descriptors = descriptorProvider.GetTestCaseDescriptors(testCaseBatch, includeSerialization: testPlatformContext.RequireXunitTestProperty);

            foreach (var descriptor in descriptors)
            {
                var vsTestCase = CreateVsTestCase(source, descriptor, logger, testPlatformContext);
                if (vsTestCase != null)
                {
                    if (discoveryOptions.GetInternalDiagnosticMessagesOrDefault())
                    {
                        logger.LogWithSource(source, "Discovered test case '{0}' (ID = '{1}', VS FQN = '{2}')", descriptor.DisplayName, descriptor.UniqueID, vsTestCase.FullyQualifiedName);
                    }

                    discoverySink.SendTestCase(vsTestCase);
                }
            }

            testCaseBatch.Clear();
        }
Esempio n. 2
0
 /// <inheritdoc/>
 public List <TestCaseDescriptor> GetTestCaseDescriptors(List <ITestCase> testCases, bool includeSerialization)
 => descriptorProvider.GetTestCaseDescriptors(testCases, includeSerialization);