public HelpParameterParserTests() { _mockEnvironment = new Mock <IEnvironment>(); ContainerBuilder containerBuilder = new ContainerBuilder(); containerBuilder .RegisterInstance(instance: _mockEnvironment.Object) .As <IEnvironment>(); containerBuilder .RegisterType <HelpParameterParser>(); _systemUnderTest = containerBuilder .Build() .Resolve <HelpParameterParser>(); }
public bool ShowHelpIfRequested() { HelpParameter helpParameter = HelpParameterParser.ParseHelpParameter(); bool isPresent = helpParameter.IsPresent; if (isPresent) { DisplayOutput.WriteLine(text: $"{Assembly.Name} - {Assembly.Version}"); DisplayOutput.WriteLine(text: string.Empty); DisplayOutput.WriteLine(text: "-h | -help : Display this help"); DisplayOutput.WriteLine(text: "-index : Display the index of the analyzed Text"); DisplayOutput.WriteLine(text: "-dictionary=file : Uses the dictionary with the given file"); DisplayOutput.WriteLine(text: "-stopwordlist=file : Uses the stopword with the given file. Default: stopword.txt"); DisplayOutput.WriteLine(text: "-texturl=url : Takes the text file from an url"); DisplayOutput.WriteLine(text: "-lang=language : Supported languages: de, en. Default: en"); } return(helpParameter.IsPresent); }