-
Notifications
You must be signed in to change notification settings - Fork 1
Description
Context:
Following the namespace compliance fixes in Phase 20 (Issue #28), where explicit namespace attributes were added to all @XmlElement annotations, basic namespace verification exists in CustomerDtoTest and DtoExportServiceImplTest. However, comprehensive test coverage and standardization across all DTO test classes remain incomplete.
Scope:
This issue tracks systematic improvements to DTO test coverage to ensure ESPI 4.0 XML compliance is thoroughly validated across all resource types.
Tasks:
-
Standardize DTO Test Patterns (Priority: P3)
- Create a base test pattern/template for all DTO tests
- Ensure consistent test structure across all DTOs
- Include standard assertions: namespace prefixes, element order, field presence
-
Add Namespace Verification to All DTO Tests (Priority: P3)
- TimeConfigurationDtoTest
- BatchListDtoTest
- SubscriptionDtoTest
- CustomerAccountDtoTest (when created)
- MeterDtoTest (when created)
- ServiceLocationDtoTest (when created)
- StatementDtoTest (when created)
- All other DTO test classes
-
Add XSD Schema Validation Tests (Priority: P4)
- Validate XML output against ESPI 4.0 XSD schemas
- Ensure customer.xsd compliance for Customer domain DTOs
- Ensure espi.xsd (usage.xsd) compliance for Usage domain DTOs
- Add test fixtures with schema validation
-
Comprehensive Field Coverage (Priority: P4)
- Verify all optional fields serialize correctly
- Test null handling for optional fields
- Test collection/list field serialization
- Verify enum serialization matches XSD
Success Criteria:
- All DTO test classes follow a consistent pattern
- Namespace prefixes verified for all nested elements across all DTOs
- XML output validates against ESPI 4.0 XSD schemas
- Test coverage > 90% for all DTO classes
- Documentation of test patterns for future DTO development
Dependencies:
- Requires Phase 20 completion (Issue Review Current Usage and Customer Entity Classes to ensure they match their ESPI Schema XSD files #28 - namespace fixes in all DTOs)
Estimated Effort: 2-3 days
Priority: P3 (Medium)
Labels:
- enhancement
- testing
- tech-debt
- dto
- espi-4.0