Class SnapshotDiffTool

Namespace
XBullet.EasyTesting.Snapshots
Assembly
XBullet.EasyTesting.Snapshots.Core.dll

Describes an external application used to compare verified and received snapshots.

public sealed class SnapshotDiffTool
Inheritance
SnapshotDiffTool
Inherited Members
Extension Methods

Constructors

SnapshotDiffTool(string, params string[])

Creates a diff-tool configuration.

public SnapshotDiffTool(string executable, params string[] arguments)

Parameters

executable string

Non-empty executable path or command name. Resolution is delegated to the operating system when the tool is launched.

arguments string[]

Non-null argument array. Entries may contain {verified} and {received} placeholders; other values are passed unchanged. The array is retained and exposed, so callers must not mutate it after construction.

Properties

Arguments

Gets command arguments. Use {verified} and {received} as path placeholders.

public IReadOnlyList<string> Arguments { get; }

Property Value

IReadOnlyList<string>

The retained caller-supplied argument array, exposed as a read-only list.

Executable

Gets the executable path or command name.

public string Executable { get; }

Property Value

string

The non-empty value supplied at construction.

Methods

Rider(string)

Creates a JetBrains Rider diff configuration.

public static SnapshotDiffTool Rider(string executable = "rider")

Parameters

executable string

Non-empty executable path or command name. The default is rider.

Returns

SnapshotDiffTool

A new configuration that invokes Rider's diff command with verified and received paths.

VisualStudio(string)

Creates a Visual Studio diff configuration.

public static SnapshotDiffTool VisualStudio(string executable = "devenv.exe")

Parameters

executable string

Non-empty executable path or command name. The default is devenv.exe.

Returns

SnapshotDiffTool

A new configuration that invokes Visual Studio's /diff command with verified and received paths.

VisualStudioCode(string)

Creates a Visual Studio Code diff configuration.

public static SnapshotDiffTool VisualStudioCode(string executable = "code")

Parameters

executable string

Non-empty executable path or command name. The default is code.

Returns

SnapshotDiffTool

A new configuration that invokes Visual Studio Code's --diff command with verified and received paths.