DiscoverTests() public method

public DiscoverTests ( string assemblyPath ) : IEnumerable
assemblyPath string
return IEnumerable
        public IEnumerable <MSpecTestCase> DiscoverSpecs(string assemblyFilePath)
        {
            using (IsolatedAppDomainExecutionScope <TestDiscoverer> scope = new IsolatedAppDomainExecutionScope <TestDiscoverer>(assemblyFilePath)) {
                TestDiscoverer discoverer = scope.CreateInstance();

                return(discoverer.DiscoverTests(assemblyFilePath).ToList());
            }
        }
Ejemplo n.º 2
0
        public IEnumerable<MSpecTestCase> DiscoverSpecs(string assemblyFilePath)
        {

#if !NETSTANDARD
            using (IsolatedAppDomainExecutionScope<TestDiscoverer> scope = new IsolatedAppDomainExecutionScope<TestDiscoverer>(assemblyFilePath)) {
                TestDiscoverer discoverer = scope.CreateInstance();
#else
                TestDiscoverer discoverer = new TestDiscoverer();
#endif
                return discoverer.DiscoverTests(assemblyFilePath).ToList();

#if !NETSTANDARD
            }
#endif
        }