public void PopulateBAMPaths() { //Happy Path var options_1 = new HygeaOptions() { BAMPaths = new string[] { TestPaths.LocalTestDataDirectory }, GenomePaths = new[] { _existingGenome }, }; Assert.NotNull(options_1.BAMPaths); Assert.True(options_1.BAMPaths.Length > 0); //no bam files found var options_3 = new HygeaOptions() { BAMPaths = new string[] { TestPaths.LocalTestDataDirectory }, GenomePaths = new[] { _existingGenome }, }; var appOptions = new HygeaOptionParser() { Options = options_3 }; appOptions.ValidateOptions(); Assert.IsType <ArgumentException>(appOptions.ParsingResult.Exception); }
private void ExecuteValidationTest(Action <HygeaOptions> testSetup, bool shouldPass) { var options = GetBasicOptions(); var parser = new HygeaOptionParser() { Options = options }; testSetup(options); parser.ValidateOptions(); if (shouldPass) { Assert.True(parser.HadSuccess); } else { Assert.True(parser.ParsingFailed); } }