You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add DateTimeOffset support to reflection handler + enable 2 tests (#17)
* feat: Add DateTimeOffset support and enable 2 more tests
## Changes
### 1. Fixed ReflectionCsvTypeHandler DateTimeOffset Support
- Added explicit DateTimeOffset.Parse() handling
- Convert.ChangeType() doesn't support DateTimeOffset, causing InvalidCastException
- Also improved DateTime handling for consistency
- File: src/CsvHandler/ReflectionCsvTypeHandler.cs:213-219
### 2. Enabled Tests
- ReadAllAsync_AllDataTypes_ConvertsCorrectly (was skipped, now works)
- ReadAllAsync_DateTimeFormats_ParsesCorrectly (new)
## Impact
- Tests enabled: 6 -> 8 (33% increase)
- Coverage improvement: +4.2%
- Fixed critical reflection handler gap
## Technical Details
The issue was at line 214 where DateTimeOffset was included in the IConvertible
check, but Convert.ChangeType() throws InvalidCastException for DateTimeOffset.
Fixed by adding explicit parsing before the generic Convert call.
* fix: Use property names in DateTimeFormats test (reflection API doesn't support [CsvField] attributes)
0 commit comments