Skip to content

Commit 16c5668

Browse files
committed
Suppress warning regarding use of properties
As this is generating a new instance each time, a method makes more sense. Suppress CA1024 warning.
1 parent 85ea5e1 commit 16c5668

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

OnTopic.AspNetCore.Mvc.Tests/ValidateTopicAttributeTest.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ public static ActionExecutingContext GetActionExecutingContext(Controller contro
6161
/// <summary>
6262
/// Generates a barebones <see cref="ControllerContext"/> for testing a controller.
6363
/// </summary>
64+
#pragma warning disable CA1024 // Use properties where appropriate
6465
public static ControllerContext GetControllerContext() =>
6566
new(
6667
new() {
@@ -69,6 +70,7 @@ public static ControllerContext GetControllerContext() =>
6970
ActionDescriptor = new ControllerActionDescriptor()
7071
}
7172
);
73+
#pragma warning restore CA1024 // Use properties where appropriate
7274

7375
/*==========================================================================================================================
7476
| METHOD: GET TOPIC CONTROLLER

0 commit comments

Comments
 (0)