public void Build_with_noSummary_parameter_should_parse_correctly() { var arguments = ArgumentParser.TryParse(new[] { "build", "--no-summary", "file1" }); var bulidOrDecompileArguments = (BuildArguments?)arguments; // using classic assert so R# understands the value is not null Assert.IsNotNull(arguments); bulidOrDecompileArguments !.InputFile.Should().Be("file1"); bulidOrDecompileArguments !.OutputToStdOut.Should().BeFalse(); bulidOrDecompileArguments !.OutputDir.Should().BeNull(); bulidOrDecompileArguments !.OutputFile.Should().BeNull(); bulidOrDecompileArguments !.NoSummary.Should().BeTrue(); }
public void BuildOneFileStdOutAllCaps_ShouldReturnOneFileAndStdout() { var arguments = ArgumentParser.TryParse(new[] { "build", "--STDOUT", "file1" }); var bulidOrDecompileArguments = (BuildArguments?)arguments; // using classic assert so R# understands the value is not null Assert.IsNotNull(arguments); bulidOrDecompileArguments !.InputFile.Should().Be("file1"); bulidOrDecompileArguments !.OutputToStdOut.Should().BeTrue(); bulidOrDecompileArguments !.OutputDir.Should().BeNull(); bulidOrDecompileArguments !.OutputFile.Should().BeNull(); bulidOrDecompileArguments !.NoSummary.Should().BeFalse(); }
public void Build_with_outputdir_parameter_should_parse_correctly() { // Use relative . to ensure directory exists else the parser will throw. var arguments = ArgumentParser.TryParse(new[] { "build", "--outdir", ".", "file1" }); var bulidOrDecompileArguments = (BuildArguments?)arguments; // using classic assert so R# understands the value is not null Assert.IsNotNull(arguments); bulidOrDecompileArguments !.InputFile.Should().Be("file1"); bulidOrDecompileArguments !.OutputToStdOut.Should().BeFalse(); bulidOrDecompileArguments !.OutputDir.Should().Be("."); bulidOrDecompileArguments !.OutputFile.Should().BeNull(); bulidOrDecompileArguments !.NoSummary.Should().BeFalse(); }