chore(sonar): clean up test-file INFO code smells (NUnit2045/2046/2011, CA1866/1861/1869) #14

Merged
bermudalamb merged 5 commits from fix/sonarqube-test-cases-code-smells into main 2026-05-27 13:02:43 -05:00
Showing only changes of commit 77eb5d8b45 - Show all commits
@@ -6,6 +6,8 @@ namespace Strata.SqlTools.SqlBreakdown.Tests.ExpressionTests;
public class ExpressionFactoryFilterTests : ExpressionTestsBase
{
private static readonly string[] values = new[] { "FY2019", "FY2020", "FY2021", "FY2022" };
private static readonly string[] monthListValues = new[] { "01-2020" };
private static readonly string[] calendarRange = new[] { "01/01/2019", "01/01/2023" };
private static IEnumerable<TestCaseData> FilterTestCases()
{
@@ -23,12 +25,12 @@ public class ExpressionFactoryFilterTests : ExpressionTestsBase
).SetName("DateListFilterFiscalYear_{m}");
yield return new TestCaseData(
new Filter(4, FilterType.List, new[] { "01-2020" }, Array.Empty<FilterCondition>(), DatePart.Month, false, 0, 0),
new Filter(4, FilterType.List, monthListValues, Array.Empty<FilterCondition>(), DatePart.Month, false, 0, 0),
"DEPT.DISCHARGE_DATE >= '2020-01-01' AND DEPT.DISCHARGE_DATE < '2020-02-01'"
).SetName("MonthListFilter_{m}");
yield return new TestCaseData(
new Filter(4, FilterType.Calendar, new[] { "01/01/2019", "01/01/2023" }, Array.Empty<FilterCondition>(), DatePart.Month, false, 0, 0),
new Filter(4, FilterType.Calendar, calendarRange, Array.Empty<FilterCondition>(), DatePart.Month, false, 0, 0),
"DEPT.DISCHARGE_DATE >= '2019-01-01' AND DEPT.DISCHARGE_DATE < '2023-01-01'"
).SetName("CalendarFilter_{m}");