This commit is contained in:
+4
-1
@@ -7,6 +7,9 @@ public class ExpressionFactoryFilterTests : ExpressionTestsBase
|
||||
{
|
||||
private static IEnumerable<TestCaseData> FilterTestCases()
|
||||
{
|
||||
var dischargeDate = DateTime.Now.Date.AddMonths(1);
|
||||
var startOfCurrentMonth = new DateTime(dischargeDate.Year, dischargeDate.Month, 1);
|
||||
var startOfEndMonth = startOfCurrentMonth.AddMonths(3);
|
||||
yield return new TestCaseData(
|
||||
new Filter(2, FilterType.List, new object[] { "foo", "bar", "baz", 1234 }, Array.Empty<FilterCondition>(), DatePart.Continuous, false, 0, 0),
|
||||
"DEPT.NAME IN ('foo', 'bar', 'baz', 1234)"
|
||||
@@ -29,7 +32,7 @@ public class ExpressionFactoryFilterTests : ExpressionTestsBase
|
||||
|
||||
yield return new TestCaseData(
|
||||
new Filter(4, FilterType.Timeframe, new object[] { }, Array.Empty<FilterCondition>(), DatePart.Month, false, 1, 3),
|
||||
"DEPT.DISCHARGE_DATE >= '2026-03-01' AND DEPT.DISCHARGE_DATE < '2026-06-01'"
|
||||
$"DEPT.DISCHARGE_DATE >= '{startOfCurrentMonth:yyyy-MM-dd}' AND DEPT.DISCHARGE_DATE < '{startOfEndMonth:yyyy-MM-dd}'"
|
||||
).SetName("TimeframeFilter_{m}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user