Skip to content

Commit 007b8b3

Browse files
committed
Removed CS8602 error from tests, which started to show up with 3.1.300
1 parent a295e0c commit 007b8b3

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

src/bunit.core.tests/RazorTesting/FixtureBaseTest.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ public async Task Test001()
3232
callLog[1].ShouldBe(nameof(SetupAsync));
3333
callLog[2].ShouldBe(nameof(Test));
3434

35-
void Setup(FixtureComponent fixture) => callLog.Add(nameof(Setup));
35+
void Setup(FixtureComponent fixture) => callLog?.Add(nameof(Setup));
3636
Task SetupAsync(FixtureComponent fixture)
3737
{
38-
callLog.Add(nameof(SetupAsync));
38+
callLog?.Add(nameof(SetupAsync));
3939
return Task.CompletedTask;
4040
}
41-
void Test(FixtureComponent fixture) => callLog.Add(nameof(Test));
41+
void Test(FixtureComponent fixture) => callLog?.Add(nameof(Test));
4242
}
4343

4444
[Fact(DisplayName = "Setup, SetupAsync and TestAsync methods are called in the correct order")]
@@ -58,15 +58,15 @@ public async Task Test002()
5858
callLog[1].ShouldBe(nameof(SetupAsync));
5959
callLog[2].ShouldBe(nameof(TestAsync));
6060

61-
void Setup(FixtureComponent fixture) => callLog.Add(nameof(Setup));
61+
void Setup(FixtureComponent fixture) => callLog?.Add(nameof(Setup));
6262
Task SetupAsync(FixtureComponent fixture)
6363
{
64-
callLog.Add(nameof(SetupAsync));
64+
callLog?.Add(nameof(SetupAsync));
6565
return Task.CompletedTask;
6666
}
6767
Task TestAsync(FixtureComponent fixture)
6868
{
69-
callLog.Add(nameof(TestAsync));
69+
callLog?.Add(nameof(TestAsync));
7070
return Task.CompletedTask;
7171
}
7272
}

src/bunit.sln

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{785D
4545
..\.github\workflows\nuget-pack-push.yml = ..\.github\workflows\nuget-pack-push.yml
4646
EndProjectSection
4747
EndProject
48-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "bunit.template", "..\templates\bunit-project\bunit.template.csproj", "{67937C33-0609-4B37-AA36-5441B701C74B}"
48+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "bunit.template", "bunit.template\bunit.template.csproj", "{56F7777C-38B1-4183-98A1-3D8D207A19BB}"
4949
EndProject
5050
Global
5151
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -87,8 +87,8 @@ Global
8787
{797E5586-8F42-4EC6-A70A-F99BAC747AE7}.Release|Any CPU.Build.0 = Release|Any CPU
8888
{2C0FEE71-208C-4CAD-B37B-C762D9D30A3A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
8989
{2C0FEE71-208C-4CAD-B37B-C762D9D30A3A}.Release|Any CPU.ActiveCfg = Release|Any CPU
90-
{67937C33-0609-4B37-AA36-5441B701C74B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
91-
{67937C33-0609-4B37-AA36-5441B701C74B}.Release|Any CPU.ActiveCfg = Release|Any CPU
90+
{56F7777C-38B1-4183-98A1-3D8D207A19BB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
91+
{56F7777C-38B1-4183-98A1-3D8D207A19BB}.Release|Any CPU.ActiveCfg = Release|Any CPU
9292
EndGlobalSection
9393
GlobalSection(SolutionProperties) = preSolution
9494
HideSolutionNode = FALSE

0 commit comments

Comments
 (0)