@@ -13,9 +13,9 @@ namespace Egil.RazorComponents.Testing
1313 public class Fixture : FragmentBase
1414 {
1515 private Action _setup = NoopTestMethod ;
16- private Func < Task > _setupAsync = NoopAsyncTestMethod ;
16+ private Func < Task > _setupAsync = NoopTestMethodAsync ;
1717 private Action _test = NoopTestMethod ;
18- private Func < Task > _testAsync = NoopAsyncTestMethod ;
18+ private Func < Task > _testAsync = NoopTestMethodAsync ;
1919 private IReadOnlyCollection < Action > _tests = Array . Empty < Action > ( ) ;
2020 private IReadOnlyCollection < Func < Task > > _testsAsync = Array . Empty < Func < Task > > ( ) ;
2121
@@ -34,7 +34,7 @@ public class Fixture : FragmentBase
3434 /// Gets or sets the asynchronous setup action to perform before the <see cref="Test"/> action,
3535 /// <see cref="TestAsync"/> action and <see cref="Tests"/> and <see cref="TestsAsync"/> actions are invoked.
3636 /// </summary>
37- [ Parameter ] public Func < Task > SetupAsync { get => _setupAsync ; set => _setupAsync = value ?? NoopAsyncTestMethod ; }
37+ [ Parameter ] public Func < Task > SetupAsync { get => _setupAsync ; set => _setupAsync = value ?? NoopTestMethodAsync ; }
3838
3939 /// <summary>
4040 /// Gets or sets the first test action to invoke, after the <see cref="Setup"/> action has
@@ -52,7 +52,7 @@ public class Fixture : FragmentBase
5252 /// Use this to assert against the <see cref="ComponentUnderTest"/> and <see cref="Fragment"/>'s
5353 /// defined in the <see cref="Fixture"/>.
5454 /// </summary>
55- [ Parameter ] public Func < Task > TestAsync { get => _testAsync ; set => _testAsync = value ?? NoopAsyncTestMethod ; }
55+ [ Parameter ] public Func < Task > TestAsync { get => _testAsync ; set => _testAsync = value ?? NoopTestMethodAsync ; }
5656
5757 /// <summary>
5858 /// Gets or sets the test actions to invoke, one at the time, in the order they are placed
@@ -73,9 +73,5 @@ public class Fixture : FragmentBase
7373 /// defined in the <see cref="Fixture"/>.
7474 /// </summary>
7575 [ Parameter ] public IReadOnlyCollection < Func < Task > > TestsAsync { get => _testsAsync ; set => _testsAsync = value ?? Array . Empty < Func < Task > > ( ) ; }
76-
77- private static void NoopTestMethod ( ) { }
78-
79- private static Task NoopAsyncTestMethod ( ) => Task . CompletedTask ;
8076 }
8177}
0 commit comments