public void GetProgramVersion() { var versionProvider = new NirvanaVersionProvider(); var version = versionProvider.GetProgramVersion(); Assert.StartsWith("Nirvana", version); }
public void GetDataVersion() { var versionProvider = new NirvanaVersionProvider(); var version = versionProvider.GetDataVersion(); Assert.Contains($"Cache version: {CacheConstants.DataVersion}", version); Assert.Contains($"Supplementary annotation version: {SupplementaryAnnotationCommon.DataVersion}", version); Assert.Contains($"Reference version: {CompressedSequenceCommon.HeaderVersion}", version); }
protected TopLevelCommandLineHandler(string programDescription, string executableName, Dictionary <string, TopLevelOption> ops, string authors, IVersionProvider versionProvider = null) { _programDescription = programDescription; _programAuthors = authors; _commandLineOps = ops; _executableName = executableName; if (versionProvider == null) { versionProvider = new NirvanaVersionProvider(); } _versionProvider = versionProvider; _errorBuilder = new StringBuilder(); _errorSpacer = new string(' ', 7); }
/// <summary> /// constructor /// </summary> protected AbstractCommandLineHandler(string programDescription, OptionSet ops, string commandLineExample, string programAuthors, IVersionProvider versionProvider = null) { _programDescription = programDescription; _programAuthors = programAuthors; _commandLineOps = ops; _commandLineExample = commandLineExample; // add the help and version options ops.Add("help|h", "displays the help menu", v => _showHelpMenu = v != null); ops.Add("version|v", "displays the version", v => _showVersion = v != null); // use the Nirvana version provider by default if (versionProvider == null) { versionProvider = new NirvanaVersionProvider(); } _versionProvider = versionProvider; _errorBuilder = new StringBuilder(); _errorSpacer = new string(' ', 7); }