Skip to content

Commit 16efb2f

Browse files
committed
Fixes
1 parent 6a7090c commit 16efb2f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docs/core/testing/snippets/testcontext/csharp-cancellation/CancellationToken.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
[TestClass]
44
public class TestClassCancellationToken
55
{
6+
// MSTest automatically sets the TestContext property before each test runs.
7+
// MSTest.Analyzers includes a diagnostic suppressor that removes CS8618
8+
// (non-nullable property uninitialized) for this property.
69
public TestContext TestContext { get; set; }
710

811
[TestMethod]

docs/core/testing/snippets/testcontext/csharp-cancellation/project.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="MSTest" Version="4.0.0" />
11+
<PackageReference Include="MSTest" Version="4.1.0" />
1212
</ItemGroup>
1313

1414
</Project>

0 commit comments

Comments
 (0)