Пример #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);
    }
Пример #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();
    }
Пример #3
0
    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);
    }
Пример #4
0
    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();
    }
Пример #5
0
    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);
    }
Пример #6
0
    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();
    }