]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commit
refactor(tests): consolidate mock station creation utilities
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 27 Feb 2026 16:46:22 +0000 (17:46 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 27 Feb 2026 16:46:22 +0000 (17:46 +0100)
commitf62321907e18368a9298f346edfbac17621f51d6
treeded58c8a0efde2aa138438c19f6e5f79bcc69fda
parent18692801a9d84c8d35c509f7d8f096d1b8719ba6
refactor(tests): consolidate mock station creation utilities

Replaced 17 inline mock station objects in OCPPAuthServiceFactory.test.ts
with calls to createMockAuthServiceTestStation() from MockFactories.ts.

This reduces test file from 327 to 228 lines (~30% reduction) while
maintaining identical test behavior.

Remaining auth adapter tests retain inline mocks due to test-specific
method requirements (inAcceptedState, getLocalAuthListEnabled, etc.)
that are appropriately kept close to their test context.

All 280 tests pass.
tests/charging-station/ocpp/auth/services/OCPPAuthServiceFactory.test.ts