@@ -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 }
0 commit comments