TestCommandBuilder Class

Summary

Builder for TestCommand.
graph BT Type-->Base0["BaseOutputBuilder<TestCommandBuilder, ITestOutput>"] Base0-->Base1["object"] Type-.->Interface0["ISupportArgumentBuilder<IHaveArgumentArchive>"] Type-.->Interface1["ISupportArgumentBuilder<IHaveArgumentFiles>"] Type-.->Interface2["ISupportSwitchBuilder<ISupportSwitchIncludeArchiveFilenames>"] Type-.->Interface3["ISupportSwitchBuilder<ISupportSwitchExcludeArchiveFilenames>"] Type-.->Interface4["ISupportSwitchBuilder<ISupportSwitchDisableParsingOfArchiveName>"] Type-.->Interface5["ISupportSwitchBuilder<ISupportSwitchIncludeFilenames>"] Type-.->Interface6["ISupportSwitchBuilder<ISupportSwitchExcludeFilenames>"] Type-.->Interface7["ISupportSwitchBuilder<ISupportSwitchPassword>"] Type-.->Interface8["ISupportSwitchBuilder<ISupportSwitchNtfsAlternateStreams>"] Type-.->Interface9["ISupportSwitchBuilder<ISupportSwitchRecurseSubdirectories>"] Type["TestCommandBuilder"] class Type type-node

Syntax

public sealed class TestCommandBuilder : BaseOutputBuilder<TestCommandBuilder, ITestOutput>, 
    ISupportArgumentBuilder<IHaveArgumentArchive>, ISupportArgumentBuilder<IHaveArgumentFiles>, 
    ISupportSwitchBuilder<ISupportSwitchIncludeArchiveFilenames>, 
    ISupportSwitchBuilder<ISupportSwitchExcludeArchiveFilenames>, 
    ISupportSwitchBuilder<ISupportSwitchDisableParsingOfArchiveName>, 
    ISupportSwitchBuilder<ISupportSwitchIncludeFilenames>, 
    ISupportSwitchBuilder<ISupportSwitchExcludeFilenames>, 
    ISupportSwitchBuilder<ISupportSwitchPassword>, 
    ISupportSwitchBuilder<ISupportSwitchNtfsAlternateStreams>, 
    ISupportSwitchBuilder<ISupportSwitchRecurseSubdirectories>

Examples

Task("TestZip")
    .Does(() =>
{
    SevenZip(m => m
       .InTestMode()
       .WithArchive(File("path/to/file.zip"))
       .WithCommandOutput(o =>
       {
           Information("7Zip version is:" + o.Information);
           foreach (var archiveTestResult in o.Archives)
           {
               var isOk = archiveTestResult.IsOk ? "OK" : "not OK";
               Information($" - {archiveTestResult.FileName} test is { isOk }");
           }
       }));
 });

Properties

Name Value Summary
OutputCommand BaseOutputCommand<ITestOutput>
Gets the output command.

Extension Methods

Name Value Summary
WithArchive<TestCommandBuilder>(FilePath) T
fluent setter for Archive.
WithDisableParsingOfArchiveName<TestCommandBuilder>() T
WithExcludeArchiveFilenames<TestCommandBuilder>(RecurseType, string, string[]) T
WithExcludeArchiveFilenames<TestCommandBuilder>(string, string[]) T
WithExcludeFilenames<TestCommandBuilder>(RecurseType, string, string[]) T
fluent setter for ISupportSwitchExcludeFilenames.
WithExcludeFilenames<TestCommandBuilder>(string, string[]) T
fluent setter for ISupportSwitchExcludeFilenames.
WithFiles<TestCommandBuilder>(FilePathCollection) T
See Cake.SevenZip.Builder.ArgumentFilesBuilder.WithFiles``1(``0,FilePath[]).
WithFiles<TestCommandBuilder>(FilePath[]) T
fluent setter for Files.

See the comments on Files, Directories and DirectoryContents regarding files and directory structures.

WithIncludeArchiveFilenames<TestCommandBuilder>(RecurseType, string, string[]) T
WithIncludeArchiveFilenames<TestCommandBuilder>(string, string[]) T
WithIncludeFilenames<TestCommandBuilder>(RecurseType, string, string[]) T
fluent setter for ISupportSwitchIncludeFilenames.
WithIncludeFilenames<TestCommandBuilder>(string, string[]) T
fluent setter for ISupportSwitchIncludeFilenames.
WithNtfsAlternateStreams<TestCommandBuilder>() T
WithPassword<TestCommandBuilder>(string) T
fluent setter for ISupportSwitchPassword.
WithRecurseSubdirectories<TestCommandBuilder>(RecurseType) T

See Also

GitHub Discussion