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:
Dependencies:
Estimated Effort: 2-3 days
Priority: P3 (Medium)
Labels:
- enhancement
- testing
- tech-debt
- dto
- espi-4.0
Context:
Following the namespace compliance fixes in Phase 20 (Issue #28), where explicit
namespaceattributes were added to all@XmlElementannotations, 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)
Add Namespace Verification to All DTO Tests (Priority: P3)
Add XSD Schema Validation Tests (Priority: P4)
Comprehensive Field Coverage (Priority: P4)
Success Criteria:
Dependencies:
Estimated Effort: 2-3 days
Priority: P3 (Medium)
Labels: