Problem
contracts/asset-maintenance/src/test.rs exists but has near-zero coverage. Maintenance record creation, alert generation, and warranty checking are completely untested.
Proposed Solution
Create contracts/opsce/src/maintenance_tests.rs with a full test suite using the Soroban test environment. Mock ledger timestamps to test time-dependent logic.
Acceptance Criteria
Problem
contracts/asset-maintenance/src/test.rsexists but has near-zero coverage. Maintenance record creation, alert generation, and warranty checking are completely untested.Proposed Solution
Create
contracts/opsce/src/maintenance_tests.rswith a full test suite using the Soroban test environment. Mock ledger timestamps to test time-dependent logic.Acceptance Criteria
create_maintenance_record()— success path, invalid asset ID failsget_maintenance_records()— returns correct records after multiple createscheck_maintenance_alerts()— no alerts when none due, correct severity at each time threshold (7, 3, 1 day, overdue)register_warranty()— success path, status is Active before expirycheck_warranty_status()— returns Expired after mocking ledger timestamp past expiryrate_provider()— correct average after multiple ratings, duplicate rating rejectedcargo test -p asset-maintenance