Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Jul 26, 2024
2 parents 0ddf9cb + 3f8adb0 commit ecf64d5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/mdsource/recording.source.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ To avoid grouping use [Stop](#stop).

Recording can be grouped by an identifier.

The identifier should be statically unique. For example a fully qualified test name or a GUID.

snippet: RecordingIdentifier

Results in:
Expand Down
2 changes: 2 additions & 0 deletions docs/recording.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ To avoid grouping use [Stop](#stop).

Recording can be grouped by an identifier.

The identifier should be statically unique. For example a fully qualified test name or a GUID.

<!-- snippet: RecordingIdentifier -->
<a id='snippet-RecordingIdentifier'></a>
```cs
Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Project>
<PropertyGroup>
<NoWarn>CS1591;CS0649;xUnit1026;xUnit1013;CS1573;VerifyTestsProjectDir;VerifySetParameters;PolyFillTargetsForNuget</NoWarn>
<Version>26.1.1</Version>
<Version>26.1.2</Version>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>preview</LangVersion>
<AssemblyVersion>1.0.0</AssemblyVersion>
Expand Down
2 changes: 2 additions & 0 deletions src/Verify/Recording/Recording_Named.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

public static partial class Recording
{
// The identifier should be statically unique. For example a fully qualified test name or a GUID.
// so it is ok for this to be shared state
static ConcurrentDictionary<string, State> namedState = new(StringComparer.OrdinalIgnoreCase);

public static void Add(string identifier, string name, object item) =>
Expand Down

0 comments on commit ecf64d5

Please sign in to comment.