Beispiel #1
0
    public void Information_sets_rawoutput()
    {
        string[]? output = null;
        var fixture = new SevenZipFluentRunnerFixture();

        fixture.GivenProcessReturnsStdOutputOf(Outputs.Information);

        fixture.RunToolFluent(t => t
                              .InInformationMode()
                              .WithCommandRawOutput(r =>
        {
            output = r;
        }));

        output.ShouldBeEquivalentTo(Outputs.Information);
    }
Beispiel #2
0
    public void Information_parses_and_sets_the_output()
    {
        string?info    = null;
        var    fixture = new SevenZipFluentRunnerFixture();

        fixture.GivenProcessReturnsStdOutputOf(Outputs.Information);

        fixture.RunToolFluent(t => t
                              .InInformationMode()
                              .WithCommandOutput(o =>
        {
            info = o.Information;
        }));

        info.ShouldNotBeNull();
    }
    public void Hash_sets_rawoutput()
    {
        string[]? output = null;
        var fixture = new SevenZipFluentRunnerFixture();

        fixture.GivenProcessReturnsStdOutputOf(Outputs.Hash);

        fixture.RunToolFluent(t => t
                              .InHashMode()
                              .WithFiles(new FilePath("in.txt"))
                              .WithCommandRawOutput(r =>
        {
            output = r;
        }));

        output.ShouldBeEquivalentTo(Outputs.Hash);
    }
    public void Hash_parses_and_sets_the_output()
    {
        string?info    = null;
        var    fixture = new SevenZipFluentRunnerFixture();

        fixture.GivenProcessReturnsStdOutputOf(Outputs.Hash);

        fixture.RunToolFluent(t => t
                              .InHashMode()
                              .WithFiles(new FilePath("in.txt"))
                              .WithCommandOutput(o =>
        {
            info = o.Information;
        }));

        info.ShouldNotBeNull();
    }
    public void List_sets_rawoutput()
    {
        string[]? output = null;
        var fixture = new SevenZipFluentRunnerFixture();

        fixture.GivenProcessReturnsStdOutputOf(Outputs.List.MultipleArchives);

        fixture.RunToolFluent(t => t
                              .InListMode()
                              .WithArchive(new FilePath("in.zip"))
                              .WithCommandRawOutput(r =>
        {
            output = r;
        }));

        output.ShouldBeEquivalentTo(Outputs.List.MultipleArchives);
    }
    public void List_parses_and_sets_the_output()
    {
        string?info    = null;
        var    fixture = new SevenZipFluentRunnerFixture();

        fixture.GivenProcessReturnsStdOutputOf(Outputs.List.MultipleArchives);

        fixture.RunToolFluent(t => t
                              .InListMode()
                              .WithArchive(new FilePath("in.zip"))
                              .WithCommandOutput(o =>
        {
            info = o.Information;
        }));

        info.ShouldNotBeNull();
    }