Exemple #1
0
        public void DisplayHelp()
        {
            // TODO: The NETCF code is just a placeholder. Figure out how to do it correctly.
            WriteHeader("Usage: NUNITLITE [assembly] [options]");
            SkipLine();
            WriteHelpLine("Runs a set of NUnitLite tests from the console.");
            SkipLine();

            WriteSectionHeader("Assembly:");
            WriteHelpLine("      An alternate assembly from which to execute tests. Normally, the tests");
            WriteHelpLine("      contained in the executable test assembly itself are run. An alternate");
            WriteHelpLine("      assembly is specified using the assembly name, without any path or.");
            WriteHelpLine("      extension. It must be in the same in the same directory as the executable");
            WriteHelpLine("      or on the probing path.");
            SkipLine();

            WriteSectionHeader("Options:");
            using (var sw = new StringWriter())
            {
                _options.WriteOptionDescriptions(sw);
                _outWriter.Write(ColorStyle.Help, sw.ToString());
            }

            WriteSectionHeader("Notes:");
            WriteHelpLine("    * File names may be listed by themselves, with a relative path or ");
            WriteHelpLine("      using an absolute path. Any relative path is based on the current ");
            WriteHelpLine("      directory or on the Documents folder if running on a under the ");
            WriteHelpLine("      compact framework.");
            SkipLine();
            if (System.IO.Path.DirectorySeparatorChar != '/')
            {
                WriteHelpLine("    * On Windows, options may be prefixed by a '/' character if desired");
                SkipLine();
            }
            WriteHelpLine("    * Options that take values may use an equal sign or a colon");
            WriteHelpLine("      to separate the option from its value.");
            SkipLine();
            WriteHelpLine("    * Several options that specify processing of XML output take");
            WriteHelpLine("      an output specification as a value. A SPEC may take one of");
            WriteHelpLine("      the following forms:");
            WriteHelpLine("          --OPTION:filename");
            WriteHelpLine("          --OPTION:filename;format=formatname");
            WriteHelpLine("          --OPTION:filename;transform=xsltfile");
            SkipLine();
            WriteHelpLine("      The --result option may use any of the following formats:");
            WriteHelpLine("          nunit3 - the native XML format for NUnit 3.0");
            WriteHelpLine("          nunit2 - legacy XML format used by earlier releases of NUnit");
            SkipLine();
            WriteHelpLine("      The --explore option may use any of the following formats:");
            WriteHelpLine("          nunit3 - the native XML format for NUnit 3.0");
            WriteHelpLine("          cases  - a text file listing the full names of all test cases.");
            WriteHelpLine("      If --explore is used without any specification following, a list of");
            WriteHelpLine("      test cases is output to the console.");
            SkipLine();
        }
Exemple #2
0
        public void DisplayHelp()
        {
            WriteHeader("Usage: NUNITLITE-RUNNER assembly [options]");
            WriteHeader("       USER-EXECUTABLE [options]");
            Writer.WriteLine();
            WriteHelpLine("Runs a set of NUnitLite tests from the console.");
            Writer.WriteLine();

            WriteSectionHeader("Assembly:");
            WriteHelpLine("      File name or path of the assembly from which to execute tests. Required");
            WriteHelpLine("      when using the nunitlite-runner executable to run the tests. Not allowed");
            WriteHelpLine("      when running a self-executing user test assembly.");
            Writer.WriteLine();

            WriteSectionHeader("Options:");
            using (var sw = new StringWriter())
            {
                _options.WriteOptionDescriptions(sw);
                Writer.Write(ColorStyle.Help, sw.ToString());
            }

            WriteSectionHeader("Notes:");
            WriteHelpLine("    * File names may be listed by themselves, with a relative path or ");
            WriteHelpLine("      using an absolute path. Any relative path is based on the current ");
            WriteHelpLine("      directory or on the Documents folder if running on a under the ");
            WriteHelpLine("      compact framework.");
            Writer.WriteLine();
            WriteHelpLine("    * On Windows, options may be prefixed by a '/' character if desired");
            Writer.WriteLine();
            WriteHelpLine("    * Options that take values may use an equal sign or a colon");
            WriteHelpLine("      to separate the option from its value.");
            Writer.WriteLine();
            WriteHelpLine("    * Several options that specify processing of XML output take");
            WriteHelpLine("      an output specification as a value. A SPEC may take one of");
            WriteHelpLine("      the following forms:");
            WriteHelpLine("          --OPTION:filename");
            WriteHelpLine("          --OPTION:filename;format=formatname");
            WriteHelpLine("          --OPTION:filename;transform=xsltfile");
            Writer.WriteLine();
            WriteHelpLine("      The --result option may use any of the following formats:");
            WriteHelpLine("          nunit3 - the native XML format for NUnit 3");
            WriteHelpLine("          nunit2 - legacy XML format used by earlier releases of NUnit");
            Writer.WriteLine();
            WriteHelpLine("      The --explore option may use any of the following formats:");
            WriteHelpLine("          nunit3 - the native XML format for NUnit 3");
            WriteHelpLine("          cases  - a text file listing the full names of all test cases.");
            WriteHelpLine("      If --explore is used without any specification following, a list of");
            WriteHelpLine("      test cases is output to the console.");
            Writer.WriteLine();
        }