示例#1
0
        /// <inheritdoc/>
        public bool OnMessage(_MessageSinkMessage message)
        {
            Guard.ArgumentNotNull(message);

            return
                (DiscoverySink.OnMessage(message) &&
                 !cancelThunk());
        }
        private IEnumerable <TestCase> GetTests(string source)
        {
            var pluginPath = Path.GetDirectoryName(GetType().Assembly.Location);
            var sourcePath = Path.GetDirectoryName(source);
            var paths      = new[] { pluginPath, sourcePath };

            using (new AssemblyResolver(paths))
            {
                var sink       = new DiscoverySink();
                var discoverer = new MSTestDiscoverer();
                discoverer.DiscoverTests(source.ToEnumerable(), null, new NullLogger(), sink);
                return(sink.TestCases);
            }
        }