IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
NUnit.Common.CommandLineOptions Class Reference

CommandLineOptions is the base class the specific option classes used for nunit3-console and nunitlite. It encapsulates all common settings and features of both. This is done to ensure that common features remain common and for the convenience of having the code in a common location. The class inherits from the Mono Options OptionSet class and provides a central location for defining and parsing options. More...

+ Inheritance diagram for NUnit.Common.CommandLineOptions:
+ Collaboration diagram for NUnit.Common.CommandLineOptions:

Public Member Functions

 CommandLineOptions (params string[] args)
 
bool Validate ()
 

Public Attributes

List< string > errorMessages = new List<string>()
 

Protected Member Functions

string RequiredValue (string val, string option, params string[] validValues)
 Case is ignored when val is compared to validValues. When a match is found, the returned value will be in the canonical case from validValues. More...
 
int RequiredInt (string val, string option)
 
virtual void ConfigureOptions ()
 

Properties

bool Explore [get, private set]
 
bool ShowHelp [get, private set]
 
bool ShowVersion [get, private set]
 
IList< string > InputFiles [get]
 
IList< string > TestList [get]
 
string WhereClause [get, private set]
 
bool WhereClauseSpecified [get]
 
int DefaultTimeout [get]
 
bool DefaultTimeoutSpecified [get]
 
int RandomSeed [get]
 
bool RandomSeedSpecified [get]
 
int NumberOfTestWorkers [get]
 
bool NumberOfTestWorkersSpecified [get]
 
bool StopOnError [get, private set]
 
bool WaitBeforeExit [get, private set]
 
bool NoHeader [get, private set]
 
bool NoColor [get, private set]
 
bool Verbose [get, private set]
 
bool TeamCity [get, private set]
 
string OutFile [get, private set]
 
bool OutFileSpecified [get]
 
string ErrFile [get, private set]
 
bool ErrFileSpecified [get]
 
string DisplayTestLabels [get, private set]
 
string WorkDirectory [get]
 
bool WorkDirectorySpecified [get]
 
string InternalTraceLevel [get, private set]
 
bool InternalTraceLevelSpecified [get]
 
bool Full [get, private set]
 Indicates whether a full report should be displayed. More...
 
IList< OutputSpecificationResultOutputSpecifications [get]
 
IList< OutputSpecificationExploreOutputSpecifications [get]
 
IList< string > ErrorMessages [get]
 

Private Member Functions

string ExpandToFullPath (string path)
 

Private Attributes

bool validated
 
bool noresult
 
List< string > inputFiles = new List<string>()
 
List< string > testList = new List<string>()
 
int defaultTimeout = -1
 
int randomSeed = -1
 
int numWorkers = -1
 
string workDirectory = null
 
List< OutputSpecificationresultOutputSpecifications = new List<OutputSpecification>()
 
List< OutputSpecificationexploreOutputSpecifications = new List<OutputSpecification>()
 

Detailed Description

CommandLineOptions is the base class the specific option classes used for nunit3-console and nunitlite. It encapsulates all common settings and features of both. This is done to ensure that common features remain common and for the convenience of having the code in a common location. The class inherits from the Mono Options OptionSet class and provides a central location for defining and parsing options.

Constructor & Destructor Documentation

NUnit.Common.CommandLineOptions.CommandLineOptions ( params string[]  args)
inline

Member Function Documentation

bool NUnit.Common.CommandLineOptions.Validate ( )
inline

Referenced by NUnit.ConsoleRunner.Tests.CommandLineTests.AssemblyAloneIsValid(), NUnit.ConsoleRunner.Tests.CommandLineTests.AssemblyName(), NUnit.ConsoleRunner.Tests.CommandLineTests.CanRecognizeLowerCaseOptionValues(), NUnit.ConsoleRunner.Tests.CommandLineTests.CanRecognizeStringOptions(), NUnit.ConsoleRunner.Tests.CommandLineTests.CanRegognizeInProcessOption(), NUnit.ConsoleRunner.Tests.CommandLineTests.ExploreOptionWithFilePath(), NUnit.ConsoleRunner.Tests.CommandLineTests.ExploreOptionWithFilePathAndFormat(), NUnit.ConsoleRunner.Tests.CommandLineTests.ExploreOptionWithFilePathAndTransform(), NUnit.ConsoleRunner.Tests.CommandLineTests.ExploreOptionWithFilePathUsingEqualSign(), NUnit.ConsoleRunner.Tests.CommandLineTests.ExploreOptionWithoutPath(), NUnit.ConsoleRunner.Tests.CommandLineTests.FileNameWithoutResultOptionLooksLikeParameter(), NUnit.ConsoleRunner.Tests.CommandLineTests.InvalidCommandLineParms(), NUnit.ConsoleRunner.Tests.CommandLineTests.InvalidOption(), NUnit.ConsoleRunner.Program.Main(), NUnit.ConsoleRunner.Tests.CommandLineTests.MissingValuesAreReported(), NUnit.ConsoleRunner.Tests.CommandLineTests.NoInputFiles(), NUnit.ConsoleRunner.Tests.CommandLineTests.ResultOptionMayBeRepeated(), NUnit.ConsoleRunner.Tests.CommandLineTests.ResultOptionWithFilePath(), NUnit.ConsoleRunner.Tests.CommandLineTests.ResultOptionWithFilePathAndFormat(), NUnit.ConsoleRunner.Tests.CommandLineTests.ResultOptionWithFilePathAndTransform(), NUnit.ConsoleRunner.Tests.CommandLineTests.ResultOptionWithoutFileNameIsInvalid(), NUnit.ConsoleRunner.Tests.CommandLineTests.TimeoutCausesErrorIfValueIsNotInteger(), NUnit.ConsoleRunner.Tests.CommandLineTests.TimeoutIsMinusOneIfNoOptionIsProvided(), and NUnit.ConsoleRunner.Tests.CommandLineTests.TimeoutParsesIntValueCorrectly().

string NUnit.Common.CommandLineOptions.RequiredValue ( string  val,
string  option,
params string[]  validValues 
)
inlineprotected

Case is ignored when val is compared to validValues. When a match is found, the returned value will be in the canonical case from validValues.

int NUnit.Common.CommandLineOptions.RequiredInt ( string  val,
string  option 
)
inlineprotected
string NUnit.Common.CommandLineOptions.ExpandToFullPath ( string  path)
inlineprivate
virtual void NUnit.Common.CommandLineOptions.ConfigureOptions ( )
inlineprotectedvirtual

Member Data Documentation

bool NUnit.Common.CommandLineOptions.validated
private
bool NUnit.Common.CommandLineOptions.noresult
private
List<string> NUnit.Common.CommandLineOptions.inputFiles = new List<string>()
private
List<string> NUnit.Common.CommandLineOptions.testList = new List<string>()
private
int NUnit.Common.CommandLineOptions.defaultTimeout = -1
private
int NUnit.Common.CommandLineOptions.randomSeed = -1
private
int NUnit.Common.CommandLineOptions.numWorkers = -1
private
string NUnit.Common.CommandLineOptions.workDirectory = null
private
List<OutputSpecification> NUnit.Common.CommandLineOptions.resultOutputSpecifications = new List<OutputSpecification>()
private
List<OutputSpecification> NUnit.Common.CommandLineOptions.exploreOutputSpecifications = new List<OutputSpecification>()
private
List<string> NUnit.Common.CommandLineOptions.errorMessages = new List<string>()

Property Documentation

bool NUnit.Common.CommandLineOptions.ShowHelp
getprivate set
bool NUnit.Common.CommandLineOptions.ShowVersion
getprivate set
bool NUnit.Common.CommandLineOptions.DefaultTimeoutSpecified
get
int NUnit.Common.CommandLineOptions.RandomSeed
get
bool NUnit.Common.CommandLineOptions.RandomSeedSpecified
get
int NUnit.Common.CommandLineOptions.NumberOfTestWorkers
get
bool NUnit.Common.CommandLineOptions.NumberOfTestWorkersSpecified
get
bool NUnit.Common.CommandLineOptions.WaitBeforeExit
getprivate set
bool NUnit.Common.CommandLineOptions.NoHeader
getprivate set
bool NUnit.Common.CommandLineOptions.NoColor
getprivate set
bool NUnit.Common.CommandLineOptions.Verbose
getprivate set
string NUnit.Common.CommandLineOptions.OutFile
getprivate set
bool NUnit.Common.CommandLineOptions.OutFileSpecified
get
string NUnit.Common.CommandLineOptions.ErrFile
getprivate set
bool NUnit.Common.CommandLineOptions.ErrFileSpecified
get
string NUnit.Common.CommandLineOptions.DisplayTestLabels
getprivate set
bool NUnit.Common.CommandLineOptions.WorkDirectorySpecified
get
bool NUnit.Common.CommandLineOptions.InternalTraceLevelSpecified
get
bool NUnit.Common.CommandLineOptions.Full
getprivate set

Indicates whether a full report should be displayed.

Referenced by NUnitLite.TextRunner.ReportResults().


The documentation for this class was generated from the following file: