4 Commits

Author SHA1 Message Date
Joseph Doherty 1e23616638 refactor(tests): migrate Database.Tests from FluentAssertions to Shouldly
Replace FluentAssertions with Shouldly across all 6 test files (94 tests).
Add ShouldlyExtensions for BeCloseTo and BeEquivalentTo patterns.
2026-01-29 14:40:18 -05:00
Joseph Doherty afb6ad4f09 test(db): add complex table extraction function tests 2026-01-06 13:44:32 -05:00
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