SnapshotTestContext Class
public sealed class SnapshotTestContext : IEquatable<SnapshotTestContext>No documentation is available.
- Implements
Constructors
| Name | Description |
|---|---|
| SnapshotTestContext(string?, IReadOnlyDictionary<string, string?>?) |
SnapshotTestContext(string?, IReadOnlyDictionary<string, string?>?)
SnapshotTestContext.cspublic SnapshotTestContext(string? TestName = null, IReadOnlyDictionary<string, string?>? Metadata = null)Parameters
TestNamestring?MetadataIReadOnlyDictionary<string, string?>?
No documentation is available.
Properties
| Name | Description |
|---|---|
| ClassName | 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. |
| Metadata | |
| MethodName | 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. |
| TestName |
ClassName
SnapshotTestContext.csSimple 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
Metadata
SnapshotTestContext.cspublic IReadOnlyDictionary<string, string?>? Metadata { get; init; }Property value
No documentation is available.
MethodName
SnapshotTestContext.csName 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
TestName
SnapshotTestContext.csMethods
| Name | Description |
|---|---|
| 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)Parameters
TestNamestring?MetadataIReadOnlyDictionary<string, string?>?
No documentation is available.
Equals overloads
Equals(SnapshotTestContext?)
public bool Equals(SnapshotTestContext? other)No documentation is available.
Equals(object?)
GetHashCode()
ToString()
Operators
| Name | Description |
|---|---|
| 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.