예제 #1
0
        public void RunAssembly(string source, Uri uri, IRunContext runContext, IFrameworkHandle frameworkHandle)
        {
            source = Path.GetFullPath(source);
            if (!File.Exists(source))
            {
                throw new ArgumentException("Could not find file: " + source);
            }

            string assemblyFilename  = source;
            string defaultConfigFile = SpecificationExecutor.GetDefaultConfigFile(source);

            runManager = new MSpecVSRunnerManager();
            runManager.RunAllTestsInAssembly(assemblyFilename, defaultConfigFile, frameworkHandle, uri);
        }
예제 #2
0
        public void RunAssemblySpecifications(string source, Uri uri, IRunContext runContext, IFrameworkHandle frameworkHandle, IEnumerable <TestCase> specifications)
        {
            source = Path.GetFullPath(source);
            if (!File.Exists(source))
            {
                throw new ArgumentException("Could not find file: " + source);
            }

            string assemblyFilename         = source;
            string defaultConfigFile        = SpecificationExecutor.GetDefaultConfigFile(source);
            IEnumerable <string> specsToRun = specifications.Select(x => x.FullyQualifiedName).ToList();

            runManager = new MSpecVSRunnerManager();
            runManager.RunTestsInAssembly(assemblyFilename, defaultConfigFile, frameworkHandle, specsToRun, uri);
        }