Skip to content

Commit 1723794

Browse files
committed
Disable warnings regarding Get*() naming convention in tests
These are following conventions for consistency.
1 parent 52a1433 commit 1723794

2 files changed

Lines changed: 5 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
@@ -63,6 +63,7 @@ public static ActionExecutingContext GetActionExecutingContext(Controller contro
6363
/// <summary>
6464
/// Generates a barebones <see cref="ControllerContext"/> for testing a controller.
6565
/// </summary>
66+
#pragma warning disable CA1024 // Use properties where appropriate
6667
public static ControllerContext GetControllerContext() =>
6768
new(
6869
new() {
@@ -71,6 +72,7 @@ public static ControllerContext GetControllerContext() =>
7172
ActionDescriptor = new ControllerActionDescriptor()
7273
}
7374
);
75+
#pragma warning restore CA1024 // Use properties where appropriate
7476

7577
/*==========================================================================================================================
7678
| METHOD: GET TOPIC CONTROLLER

OnTopic.Tests/ViewModels/MethodBasedReferenceViewModel.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ public class MethodBasedReferenceViewModel {
2121
private TopicViewModel? _methodValue;
2222

2323
public void SetMethod(TopicViewModel? methodValue) => _methodValue = methodValue;
24+
25+
#pragma warning disable CA1024 // Use properties where appropriate
2426
public TopicViewModel? GetMethod() => _methodValue;
27+
#pragma warning restore CA1024 // Use properties where appropriate
2528

2629
} //Class
2730
} //Namespace

0 commit comments

Comments
 (0)