Ejemplo n.º 1
0
        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();
        }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
0
        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();
        }