SnapshotTestContext Class

public sealed class SnapshotTestContext : IEquatable<SnapshotTestContext>

No documentation is available.

Implements

Constructors

NameDescription
SnapshotTestContext(string?, IReadOnlyDictionary<string, string?>?)

SnapshotTestContext(string?, IReadOnlyDictionary<string, string?>?)

SnapshotTestContext.cs
public SnapshotTestContext(string? TestName = null, IReadOnlyDictionary<string, string?>? Metadata = null)

No documentation is available.

Properties

NameDescription
ClassNameSimple name of the class the running test belongs to, when the test framework exposes it. When set, it is used as SnapshotPathContext.ClassName without walking the call stack; the stack is only consulted when it is null.
Metadata
MethodNameName of the running test method, when the test framework exposes it. Unlike SnapshotTestContext.TestName, it never contains the test arguments. When set, it is used as SnapshotPathContext.MethodName without walking the call stack; the stack is only consulted when it is null.
TestName

Simple name of the class the running test belongs to, when the test framework exposes it. When set, it is used as SnapshotPathContext.ClassName without walking the call stack; the stack is only consulted when it is null.

public string? ClassName { get; init; }

Property value

string?

public IReadOnlyDictionary<string, string?>? Metadata { get; init; }

No documentation is available.

Name of the running test method, when the test framework exposes it. Unlike SnapshotTestContext.TestName, it never contains the test arguments. When set, it is used as SnapshotPathContext.MethodName without walking the call stack; the stack is only consulted when it is null.

public string? MethodName { get; init; }

Property value

string?

public string? TestName { get; init; }

Property value

string?

No documentation is available.

Methods

NameDescription
Deconstruct(string?, IReadOnlyDictionary<string, string?>?)
Equals(SnapshotTestContext?)
Equals(object?)
GetHashCode()
ToString()

Deconstruct(string?, IReadOnlyDictionary<string, string?>?)

public void Deconstruct(out string? TestName, out IReadOnlyDictionary<string, string?>? Metadata)

No documentation is available.

Equals overloads

Equals(SnapshotTestContext?)

public bool Equals(SnapshotTestContext? other)
Parameters
other SnapshotTestContext?
Returns

bool

No documentation is available.

Equals(object?)

public override bool Equals(object? obj)
Parameters
obj object?
Returns

bool

No documentation is available.

GetHashCode()

public override int GetHashCode()

Returns

int

No documentation is available.

ToString()

public override string ToString()

Returns

string

No documentation is available.

Operators

NameDescription
operator ==(SnapshotTestContext?, SnapshotTestContext?)
operator !=(SnapshotTestContext?, SnapshotTestContext?)

operator ==(SnapshotTestContext?, SnapshotTestContext?)

public static bool operator ==(SnapshotTestContext? left, SnapshotTestContext? right)

No documentation is available.

operator !=(SnapshotTestContext?, SnapshotTestContext?)

public static bool operator !=(SnapshotTestContext? left, SnapshotTestContext? right)

No documentation is available.