ToolFixture<TToolSettings, TFixtureResult> Class

Summary

Base class for tool fixtures.
Namespace
Cake.Testing.Fixtures
Base Types
  • object
Derived Types
graph BT Type-->Base0["object"] Type["ToolFixture<TToolSettings, TFixtureResult>"] class Type type-node Derived0["ToolFixture<TToolSettings>"]-->Type click Derived0 "/api/Cake.Testing.Fixtures/ToolFixture_1"

Syntax

public abstract class ToolFixture<TToolSettings, TFixtureResult> 
    where TToolSettings : ToolSettings, new() where TFixtureResult : ToolFixtureResult

Type Parameters

Name Description
TToolSettings The type of the tool settings.
TFixtureResult The type of the fixture result.

Constructors

Name Summary
ToolFixture(string) Initializes a new instance of the ToolFixture<TToolSettings, TFixtureResult> class.

Properties

Name Value Summary
Configuration FakeConfiguration
Gets or sets the configuration.
DefaultToolPath FilePath
Gets the default tool path.
Environment FakeEnvironment
Gets or sets the environment.
FileSystem FakeFileSystem
Gets or sets the file system.
Globber IGlobber
Gets or sets the globber.
ProcessRunner ToolFixtureProcessRunner<TFixtureResult>
Gets or sets the process runner.
Settings TToolSettings
Gets or sets the tool settings.
Tools IToolLocator
Gets or sets the tool locator.

Methods

Name Value Summary
CreateResult(FilePath, ProcessSettings) TFixtureResult
Creates the tool fixture result from the provided tool path and process settings.
GetDefaultToolPath(string) FilePath
Gets the default tool path.
Run() TFixtureResult
Runs the tool.
RunTool() void
Runs the tool.

Extension Methods

Name Value Summary
Dump<ToolFixture<TToolSettings, TFixtureResult>>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
GivenDefaultToolDoNotExist<TToolSettings, TFixtureResult>() void
Ensures that the tool does not exist under the tool settings tool path.
GivenProcessCannotStart<TToolSettings, TFixtureResult>() void
Ensures that the tool's process is unable to start.
GivenProcessExitsWithCode<TToolSettings, TFixtureResult>(int) void
Ensures that the tool process exits with the given exit code.
GivenSettingsToolPathExist<TToolSettings, TFixtureResult>() void
Ensures that the tool exist under the tool settings tool path.
IsIn<ToolFixture<TToolSettings, TFixtureResult>>(ToolFixture<TToolSettings, TFixtureResult>[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<ToolFixture<TToolSettings, TFixtureResult>>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<ToolFixture<TToolSettings, TFixtureResult>>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
ThrowIfNull<ToolFixture<TToolSettings, TFixtureResult>>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<ToolFixture<TToolSettings, TFixtureResult>>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin
ToStringWithNullMarkup() string
Returns the string value or a Not set> markup suitable for Spectre.Console.
Requires the Cake.Issues addin