]> Piment Noir Git Repositories - e-mobility-charging-stations-simulator.git/commitdiff
refactor(tests): harmonize test file names and @file descriptions
authorJérôme Benoit <jerome.benoit@sap.com>
Tue, 7 Apr 2026 19:07:33 +0000 (21:07 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Tue, 7 Apr 2026 19:07:33 +0000 (21:07 +0200)
- Rename test files to follow Source-Focus.test.ts convention:
  OCPP16SignedMeterValues → OCPP16ServiceUtils-SignedMeterValues
  OCPP20SignedMeterValues → OCPP20RequestBuilders-SignedMeterValues
  OCPP16SchemaValidation → OCPP16ServiceUtils-SchemaValidation
  OCPP20SchemaValidation → OCPP20IncomingRequestService-SchemaValidation
  OCPP16VendorParametersKey → Configuration (in tests/types/)
- Harmonize all @file tags to 'Tests for <SourceModule> [focus]' pattern
- Fix module name mismatches, dot notation, and inverted descriptions
- Integration tests use descriptive 'Tests for OCPP X.Y <feature>' style

22 files changed:
tests/charging-station/ChargingStation.test.ts
tests/charging-station/ocpp/1.6/OCPP16Integration-ChargingProfiles.test.ts
tests/charging-station/ocpp/1.6/OCPP16Integration-Configuration.test.ts
tests/charging-station/ocpp/1.6/OCPP16Integration-Transactions.test.ts
tests/charging-station/ocpp/1.6/OCPP16RequestService-CallChain.test.ts
tests/charging-station/ocpp/1.6/OCPP16ServiceUtils-SchemaValidation.test.ts [moved from tests/charging-station/ocpp/1.6/OCPP16SchemaValidation.test.ts with 99% similarity]
tests/charging-station/ocpp/1.6/OCPP16ServiceUtils-SignedMeterValues.test.ts [moved from tests/charging-station/ocpp/1.6/OCPP16SignedMeterValues.test.ts with 99% similarity]
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GroupIdStop.test.ts
tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-SchemaValidation.test.ts [moved from tests/charging-station/ocpp/2.0/OCPP20SchemaValidation.test.ts with 99% similarity]
tests/charging-station/ocpp/2.0/OCPP20Integration.test.ts
tests/charging-station/ocpp/2.0/OCPP20RequestBuilders-SignedMeterValues.test.ts [moved from tests/charging-station/ocpp/2.0/OCPP20SignedMeterValues.test.ts with 99% similarity]
tests/charging-station/ocpp/2.0/OCPP20RequestService-CallChain.test.ts
tests/charging-station/ocpp/2.0/OCPP20ResponseService-CacheUpdate.test.ts
tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-AuthCache.test.ts
tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-ReconnectDelay.test.ts
tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-enforceMessageLimits.test.ts
tests/charging-station/ocpp/OCPPSignedMeterDataGenerator.test.ts
tests/charging-station/ocpp/OCPPSignedMeterValueUtils.test.ts
tests/charging-station/ui-server/UIMCPServer.integration.test.ts
tests/types/ocpp/1.6/Configuration.test.ts
tests/types/ocpp/1.6/MeterValues.test.ts
tests/utils/Configuration.test.ts

index c456c864759e270a99d7eef68ec30175e58c5879..023ab14e54b2755907956475c8fc78de9a36a8d8 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file ChargingStation Integration Tests
+ * @file Tests for ChargingStation integration
  * @description Integration test suite that verifies all ChargingStation test modules work together.
  *
  * Related domain-specific test files:
index ad3eef641aa039d1998d836ccee6303ce789a3bd..c4655c359c7f68f4f06aa08b17df24107847e244 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file Tests for OCPP 1.6 Charging Profile Management — Integration
+ * @file Tests for OCPP 1.6 Charging Profile Management integration
  * @see OCPP 1.6 — §9.3 SetChargingProfile, §9.1 ClearChargingProfile, §9.2 GetCompositeSchedule
  * @description Multi-step integration tests verifying roundtrip flows across SetChargingProfile,
  *   ClearChargingProfile, and GetCompositeSchedule handlers for OCPP 1.6 Smart Charging
index a2d7689409ba981792eab5a309bfe8b849ac5ed0..60275e8bb38f59509eab195b7adbbdd2a4e33a99 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file Tests for OCPP16 Integration — Configuration Management
+ * @file Tests for OCPP 1.6 Configuration Management integration
  * @see OCPP 1.6 — §5.4 ChangeConfiguration, §5.8 GetConfiguration
  * @description Multi-step integration tests verifying ChangeConfiguration → GetConfiguration
  *   roundtrips for OCPP 1.6 configuration management flows
index 93903de91a7253f8c4757a30b4cd500705d26d0b..aace2bbbc668a92befec7230472ebb6c050c3856 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file Tests for OCPP 1.6 integration — Transaction lifecycle
+ * @file Tests for OCPP 1.6 Transaction lifecycle integration
  * @module OCPP 1.6 — §5.11 RemoteStartTransaction, §5.12 RemoteStopTransaction,
  *   §5.14 StartTransaction (response), §5.16 StopTransaction (response)
  * @description Multi-step integration tests crossing IncomingRequestService, RequestService,
index defd32eecf47f074342d19af5ab74cf43a1d5068..9d724e1fbc4e3a8cad10d60d6306b56284bdbbf7 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file Call chain integration tests for OCPP 1.6 request pipeline
+ * @file Tests for OCPP16RequestService call chain integration
  * @description Verifies that requestHandler → buildRequestPayload → sendMessage
  *   is the single path for all outgoing requests.
  */
similarity index 99%
rename from tests/charging-station/ocpp/1.6/OCPP16SchemaValidation.test.ts
rename to tests/charging-station/ocpp/1.6/OCPP16ServiceUtils-SchemaValidation.test.ts
index afbecfcb8fdf383dffadfec0d3fb97ded7a0ec06..39aa1db06ca8f99f54e5d8cb359a06223fc17b6e 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file Tests for OCPP 1.6 JSON schema validation
+ * @file Tests for OCPP16ServiceUtils JSON schema validation
  * @module OCPP 1.6 — §4.1 BootNotification, §5.11 RemoteStartTransaction, §9.3 SetChargingProfile,
  *   §5.13 Reset, §5.3 ChangeAvailability (representative schema coverage)
  * @description Verifies that OCPP 1.6 JSON schemas correctly validate and reject payloads
similarity index 99%
rename from tests/charging-station/ocpp/1.6/OCPP16SignedMeterValues.test.ts
rename to tests/charging-station/ocpp/1.6/OCPP16ServiceUtils-SignedMeterValues.test.ts
index 88a114383bfc2ed4e1824a923a7dedad294b2af4..22620b3291adc041713d720ab5567d9a03a5bebf 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file Tests for OCPP 1.6 signed meter value support
+ * @file Tests for OCPP16ServiceUtils signed meter value support
  * @module OCPP 1.6 — Signed MeterValues (OCA Application Note v1.0)
  * @description Verifies signed meter value integration in transaction begin/end functions,
  * buildSignedOCPP16SampledValue, and periodic meter values.
index 621790b6b8ad602ed2f7170b1c68ba9bd00f892f..87292ce4b859ed0934a60f50564bdc64c59f232d 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file Tests for OCPP 2.0 GroupId-based stop transaction authorization
+ * @file Tests for OCPP20IncomingRequestService GroupId-based stop transaction
  * @description Unit tests for C01.FR.03, C09.FR.03, C09.FR.07 conformance
  */
 
similarity index 99%
rename from tests/charging-station/ocpp/2.0/OCPP20SchemaValidation.test.ts
rename to tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-SchemaValidation.test.ts
index 58f6ef2374e976db69b4467b1af2e6a2563e049d..e60eb6fe0a0443ee346fbda7699a11024c0bce6e 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file Tests for OCPP 2.0 JSON schema validation (negative tests)
+ * @file Tests for OCPP20IncomingRequestService JSON schema validation (negative tests)
  * @description Verifies that OCPP 2.0.1 JSON schemas correctly reject invalid payloads
  * when compiled with AJV. Tests the schemas directly (not through service plumbing),
  * which ensures correctness regardless of path resolution in tsx/dist modes.
index 892ea8627e2c9761cb05114b8332896eed2f6634..c60c63a2f27245f845a0b2a12557ef02122627d7 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file Tests for OCPP 2.0 integration (SetVariables → GetVariables consistency)
+ * @file Tests for OCPP 2.0 integration
  * @description Verifies that SetVariables and GetVariables produce consistent results
  */
 
similarity index 99%
rename from tests/charging-station/ocpp/2.0/OCPP20SignedMeterValues.test.ts
rename to tests/charging-station/ocpp/2.0/OCPP20RequestBuilders-SignedMeterValues.test.ts
index 0013ed6bf06b85598e5d029139f35bb8b3b9b428..08ceddd4eccda8cc32c8ea7c06a837eb2defd388 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file Tests for OCPP 2.0 signed meter value support
+ * @file Tests for OCPP20RequestBuilders signed meter value support
  * @description Verifies signedMeterValue population in sampled value building,
  *              context-dependent sub-switch logic, and public key inclusion.
  */
index ee4c618c4b978f4258db1598d1b28a28fa002a44..1d61794fc8b2ae59e06bef05a71903a51db9664b 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file Call chain integration tests for OCPP 2.0 request pipeline
+ * @file Tests for OCPP20RequestService call chain integration
  * @description Verifies that requestHandler → buildRequestPayload → sendMessage
  *   is the single path for all outgoing requests. Minimal params in, complete
  *   spec-compliant payload in sendMessage.
index b07202c321df747aa2ef99f3cd8996fae471bf1f..b4d7cf2225931c2d856877691be97fb593298436 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file Tests for OCPPAuthServiceImpl.updateCacheEntry
+ * @file Tests for OCPP20ResponseService cache update
  * @description Unit tests for auth cache updates per OCPP 2.0.1
  * C10.FR.01/05, C12.FR.06, C02.FR.03, C03.FR.02
  */
index d815f6d9b5d6a898b152a0e30bcf8310c752de34..bd88541b71a1125c0c804482bb5d6de7355c1c5d 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file Tests for OCPP20ServiceUtils.updateAuthorizationCache
+ * @file Tests for OCPP20ServiceUtils authorization cache
  * @description Verifies the static helper that delegates auth cache updates to OCPPAuthService,
  * covering the C10.FR.04 AuthorizeResponse path and graceful error handling.
  */
index 890691e777a9a594d5f5e619edebef5eae20455c..0b85e2210ba4be80512f0d22a07fb01e4c2b6734 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file Tests for OCPP20ServiceUtils.computeReconnectDelay
+ * @file Tests for OCPP20ServiceUtils reconnect delay computation
  * @description Verifies OCPP 2.0.1 §8.1-§8.3 RetryBackOff reconnection delay computation,
  * including default values, variable-configured values, and retry capping.
  */
index 3d4cd91100fc6e00927bbff31e1ba8dbc60a3da1..d569b195e8142bf89bf8460fe7c8a8ad6e4a749f 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file Tests for OCPP20ServiceUtils.enforceMessageLimits
+ * @file Tests for OCPP20ServiceUtils message limits enforcement
  * @description Verifies message limit enforcement logic for OCPP 2.0 payloads
  */
 
index d7c7852ad67229e19ce29af9845aba921bf243eb..ad0309d3e82ad3345dd7aef8d893881fda605098 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file Tests for SignedMeterDataGenerator
+ * @file Tests for OCPPSignedMeterDataGenerator
  * @description Verifies OCMF-like signed meter data generation for simulation purposes.
  *
  * Covers:
index 5ebb0a7bee5713212dc024e3c1667b661e885448..eead34cfbd009f7d97b7f34c4e0d3d0e775e179e 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file Tests for SignedMeterValueUtils
+ * @file Tests for OCPPSignedMeterValueUtils
  * @description Unit tests for PublicKeyWithSignedMeterValueEnumType and shouldIncludePublicKey helper
  */
 import assert from 'node:assert/strict'
index 6349347203bb2c4984e477466df8e1994c8316da..881dec9c822d952b07602d36b4440c6880160194 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file UIMCPServer Integration Tests
+ * @file Tests for UIMCPServer integration
  * @description HTTP integration tests verifying MCP endpoint responds correctly
  */
 
index 5bebf2ea53ee8ea3ab238b086a733853dc073fa9..930dc6436653f7fbf3fc279e93560ef02348e874 100644 (file)
@@ -1,6 +1,6 @@
 /**
- * @file Tests for OCPP16VendorParametersKey enum
- * @description Unit tests for signed meter values vendor configuration keys
+ * @file Tests for OCPP 1.6 Configuration types
+ * @description Unit tests for OCPP16VendorParametersKey enum values
  */
 import assert from 'node:assert/strict'
 import { describe, it } from 'node:test'
index 774ae39b18eddd13c938d0936938e6dbeb35e210..94027a79fc57cd0c56be0c405a6e69a46f2b1f3e 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file OCPP 1.6 MeterValues types test suite
+ * @file Tests for OCPP 1.6 MeterValues types
  * @description Tests for OCPP16MeterValueFormat enum and OCPP16SignedMeterValue interface
  */
 
index 4917bd5a83011ce645f091f9b8ae1fd8bfcf455a..67ff6c2586a30843dae7ebdb9aede45f50125c6a 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file Tests for Configuration static class
+ * @file Tests for Configuration
  * @description Verifies configuration loading, section building, and deprecated key handling
  *
  * Covers: