public void BuildOneFile_ShouldReturnOneFile() { var arguments = (BuildArguments?)ArgumentParser.TryParse(new[] { "build", "file1" }); // using classic assert so R# understands the value is not null Assert.IsNotNull(arguments); arguments !.InputFile.Should().Be("file1"); arguments !.OutputToStdOut.Should().BeFalse(); arguments !.OutputDir.Should().BeNull(); arguments !.OutputFile.Should().BeNull(); }
public void Build_with_outputfile_parameter_should_parse_correctly() { var arguments = (BuildArguments?)ArgumentParser.TryParse(new[] { "build", "--outfile", "jsonFile", "file1" }); // using classic assert so R# understands the value is not null Assert.IsNotNull(arguments); arguments !.InputFile.Should().Be("file1"); arguments !.OutputToStdOut.Should().BeFalse(); arguments !.OutputDir.Should().BeNull(); arguments !.OutputFile.Should().Be("jsonFile"); }
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(); }
public void DecompileOneFile_ShouldReturnOneFile() { var arguments = ArgumentParser.TryParse(new[] { "decompile", "file1" }); var bulidOrDecompileArguments = (DecompileArguments?)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(); }
public void Decompile_with_outputdir_parameter_should_parse_correctly() { var arguments = ArgumentParser.TryParse(new[] { "build", "--outdir", "outdir", "file1" }); var bulidOrDecompileArguments = (BuildOrDecompileArguments?)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("outdir"); bulidOrDecompileArguments !.OutputFile.Should().BeNull(); }
public void Decompile_with_outputdir_parameter_should_parse_correctly() { // Use relative . to ensure directory exists else the parser will throw. var arguments = ArgumentParser.TryParse(new[] { "decompile", "--outdir", ".", "file1" }); var bulidOrDecompileArguments = (DecompileArguments?)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(); }
public void BuildOneFileStdOut_and_no_restore_ShouldReturnOneFileAndStdout() { var arguments = ArgumentParser.TryParse(new[] { "build", "--stdout", "--no-restore", "file1" }); var buildArguments = (BuildArguments?)arguments; // using classic assert so R# understands the value is not null Assert.IsNotNull(arguments); buildArguments !.InputFile.Should().Be("file1"); buildArguments !.OutputToStdOut.Should().BeTrue(); buildArguments !.OutputDir.Should().BeNull(); buildArguments !.OutputFile.Should().BeNull(); buildArguments !.NoRestore.Should().BeTrue(); }