Method TryGetTestMetadata
- Namespace
- Xunit.Runner.Common
- Assembly
- xunit.v3.runner.common.dll
TryGetTestMetadata(string, bool)
Attempts to retrieve ITestMetadata from the cache (and optionally remove it).
public ITestMetadata? TryGetTestMetadata(string testUniqueID, bool remove = false)
Parameters
testUniqueIDstringThe unique ID of the test to retrieve.
removeboolSet to
trueto remove the metadata after retrieval.
Returns
The cached metadata, if present; or
nullif there isn't any.
TryGetTestMetadata(ITestMessage)
Attempts to retrieve ITestMetadata from the cache.
public ITestMetadata? TryGetTestMetadata(ITestMessage message)
Parameters
messageThe message that indicates which metadata to retrieve.
Returns
The cached metadata, if present; or
nullif there isn't any.