Commit Graph

2 Commits

Author SHA1 Message Date
Joseph Doherty e0d0ffa8fc test(db): add simple table extraction function tests
Add comprehensive tests for the 5 simple table extraction functions:
- fn_GetSearchWorkOrders
- fn_GetSearchItemNumbers
- fn_GetSearchProfitCenters
- fn_GetSearchWorkCenters
- fn_GetSearchOperatorIDs

Each function tested for:
- Valid array returns all values
- Empty array returns empty
- Missing property returns empty
- Search not found returns empty
- NULL criteria returns empty
- Invalid JSON returns empty
- Bad type values (nulls) filtered out

Additional edge case tests for large arrays and long values.
Total: 38 tests (7 per function + 2 additional edge cases).
2026-01-06 13:40:22 -05:00
Joseph Doherty 13ae0091dd test(db): add scalar extraction function tests
Tests all 3 scalar functions:
- fn_GetSearchMinimumDt
- fn_GetSearchMaximumDt
- fn_GetSearchExtractMisData

Test cases cover:
- Valid JSON extraction
- Missing property returns NULL
- Search not found returns NULL
- NULL criteria returns NULL
- Invalid JSON returns NULL

Uses DatabaseTestBase infrastructure with FluentAssertions and Dapper.
2026-01-06 13:36:12 -05:00