private IEnumerable <ITest> ProduceTestCases(bool debugInfo)
        {
            Exception error = null;

            Assembly[] references = Dependencies;
            foreach (string resource in Resources)
            {
                if (null != error)
                {
                    yield return(new FailingTest(resource, error));

                    continue;
                }

                string assemblyPath = EmitAndInstrumentAssemblyFromResource(resource, references, debugInfo, out error);
                if (null != error)
                {
                    yield return(new FailingTest(resource, error));

                    error = new Exception("The sibling resource '" + resource + "' has errors.", error);
                    continue;
                }

                Type        type  = GetTestCaseType(assemblyPath, resource);
                IEnumerable suite = type.IsSubclassOf(typeof(InstrumentedTestCase))
                                                        ? new InstrumentationTestSuiteBuilder(this, type)
                                                        : new ReflectionTestSuiteBuilder(type);

                foreach (Object test in suite)
                {
                    yield return((ITest)test);
                }

                if (ShouldVerify(resource))
                {
                    yield return(new VerifyAssemblyTest(assemblyPath));
                }

                references = ArrayServices.Append(references, type.Assembly);
            }
        }
 public static string[] BuildCommandLine(string options, string path)
 {
     string[] cmdLine = options.Split(' ');
     return(ArrayServices.Append(cmdLine, path));
 }