From 8c7ce130606b38a3e5fd9c060f59bac40d24186d Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 10 Apr 2026 18:27:37 +0200 Subject: [PATCH] refactor(tests): replace re-export hub with direct imports MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Remove ChargingStationTestUtils.ts re-export hub and update all 73 test files to import directly from their defining modules (StationHelpers, TestLifecycleHelpers, MockCaches, MockWebSocket). Fix __testable__ barrel bypass in OCPP20RequestService-CallChain test. Harmonize Web UI test imports to use composables/types barrels consistently and export validateUUID from composables barrel. Add 'Direct Imports' convention to TEST_STYLE_GUIDE.md §6. --- .serena/memories/code_style_conventions.md | 2 +- tests/TEST_STYLE_GUIDE.md | 16 ++++++++ .../AutomaticTransactionGenerator.test.ts | 4 +- .../ChargingStation-Configuration.test.ts | 2 +- .../ChargingStation-Connectors.test.ts | 2 +- .../ChargingStation-Lifecycle.test.ts | 2 +- .../ChargingStation-Resilience.test.ts | 2 +- .../ChargingStation-Transactions.test.ts | 2 +- .../charging-station/ChargingStation.test.ts | 11 ++--- .../ChargingStationTestUtils.ts | 40 ------------------- .../ConfigurationKeyUtils.test.ts | 2 +- tests/charging-station/Helpers.test.ts | 2 +- tests/charging-station/IdTagsCache.test.ts | 2 +- ...rgingStationWorkerBroadcastChannel.test.ts | 2 +- ...omingRequestService-TriggerMessage.test.ts | 2 +- .../OCPP16Integration-Transactions.test.ts | 2 +- .../OCPP16RequestService-CallChain.test.ts | 2 +- ...PP16ResponseService-SimpleHandlers.test.ts | 4 +- .../OCPP16ServiceUtils-MeterValues.test.ts | 2 +- ...PP16ServiceUtils-SignedMeterValues.test.ts | 2 +- .../ocpp/1.6/OCPP16ServiceUtils.test.ts | 2 +- .../ocpp/1.6/OCPP16TestUtils.ts | 2 +- .../2.0/OCPP20CertSigningRetryManager.test.ts | 2 +- ...ngRequestService-CertificateSigned.test.ts | 2 +- ...0IncomingRequestService-ClearCache.test.ts | 2 +- ...RequestService-CustomerInformation.test.ts | 2 +- ...ncomingRequestService-DataTransfer.test.ts | 2 +- ...ngRequestService-DeleteCertificate.test.ts | 2 +- ...comingRequestService-GetBaseReport.test.ts | 2 +- ...Service-GetInstalledCertificateIds.test.ts | 2 +- ...CPP20IncomingRequestService-GetLog.test.ts | 2 +- ...equestService-GetTransactionStatus.test.ts | 2 +- ...ncomingRequestService-GetVariables.test.ts | 2 +- ...gRequestService-InstallCertificate.test.ts | 2 +- ...comingRequestService-LocalAuthList.test.ts | 2 +- ...0IncomingRequestService-MasterPass.test.ts | 2 +- ...mingRequestService-RemoteStartAuth.test.ts | 5 +-- ...estService-RequestStartTransaction.test.ts | 2 +- ...uestService-RequestStopTransaction.test.ts | 2 +- ...OCPP20IncomingRequestService-Reset.test.ts | 2 +- ...ngRequestService-SetNetworkProfile.test.ts | 2 +- ...ncomingRequestService-SetVariables.test.ts | 2 +- ...omingRequestService-TriggerMessage.test.ts | 4 +- ...mingRequestService-UnlockConnector.test.ts | 4 +- ...omingRequestService-UpdateFirmware.test.ts | 2 +- .../2.0/OCPP20Integration-Certificate.test.ts | 2 +- .../ocpp/2.0/OCPP20Integration.test.ts | 2 +- ...0RequestBuilders-SignedMeterValues.test.ts | 2 +- .../OCPP20RequestService-CallChain.test.ts | 4 +- .../OCPP20RequestService-DataTransfer.test.ts | 2 +- ...Service-FirmwareStatusNotification.test.ts | 2 +- .../OCPP20RequestService-HeartBeat.test.ts | 2 +- .../2.0/OCPP20RequestService-ISO15118.test.ts | 2 +- ...questService-LogStatusNotification.test.ts | 2 +- .../OCPP20RequestService-MeterValues.test.ts | 2 +- .../OCPP20RequestService-NotifyReport.test.ts | 2 +- ...tService-SecurityEventNotification.test.ts | 2 +- ...PP20RequestService-SignCertificate.test.ts | 2 +- ...20ResponseService-BootNotification.test.ts | 4 +- .../OCPP20ResponseService-CacheUpdate.test.ts | 2 +- ...PP20ResponseService-SimpleHandlers.test.ts | 4 +- ...20ResponseService-TransactionEvent.test.ts | 2 +- .../2.0/OCPP20ServiceUtils-AuthCache.test.ts | 2 +- .../OCPP20ServiceUtils-ReconnectDelay.test.ts | 2 +- ...P20ServiceUtils-StatusNotification.test.ts | 2 +- ...CPP20ServiceUtils-TransactionEvent.test.ts | 2 +- .../ocpp/2.0/OCPP20TestUtils.ts | 2 +- .../ocpp/2.0/OCPP20VariableManager.test.ts | 2 +- .../ocpp/OCPPServiceOperations.test.ts | 2 +- .../ocpp/OCPPServiceUtils-meterValues.test.ts | 2 +- .../ocpp/auth/OCPPAuthIntegration.test.ts | 2 +- .../factories/AuthComponentFactory.test.ts | 2 +- tests/helpers/TestLifecycleHelpers.ts | 2 +- .../ChargingStationConfigurationUtils.test.ts | 2 +- tests/utils/ErrorUtils.test.ts | 2 +- tests/utils/MessageChannelUtils.test.ts | 2 +- ui/web/src/composables/index.ts | 1 + ui/web/tests/unit/CSConnector.test.ts | 3 +- ui/web/tests/unit/CSData.test.ts | 3 +- ui/web/tests/unit/UIClient.test.ts | 2 +- ui/web/tests/unit/Utils.test.ts | 2 +- 81 files changed, 104 insertions(+), 137 deletions(-) delete mode 100644 tests/charging-station/ChargingStationTestUtils.ts diff --git a/.serena/memories/code_style_conventions.md b/.serena/memories/code_style_conventions.md index e4d9ba49..313263c6 100644 --- a/.serena/memories/code_style_conventions.md +++ b/.serena/memories/code_style_conventions.md @@ -98,7 +98,7 @@ Full guide: `tests/TEST_STYLE_GUIDE.md`. Key points: - **Station factory**: `createMockChargingStation(options?)` returns `{ station, mocks }` with MockWebSocket, parentPortMessages, file system mocks - **Auth factories**: `createMockAuthRequest()`, `createMockAuthorizationResult()`, `createMockAuthService()` in `tests/charging-station/ocpp/auth/helpers/MockFactories.ts` - **Transaction setup**: `setupConnectorWithTransaction(station, connectorId, { transactionId, idTag? })` -- **Re-export hub**: `tests/charging-station/ChargingStationTestUtils.ts` aggregates all test utilities +- **Direct imports**: Test files import from the defining module, not through re-export hubs. `src/` barrels remain (public API) - **`__testable__` pattern**: `ocpp/1.6/__testable__/` and `ocpp/2.0/__testable__/` directories expose internal classes (e.g., `OCPP20VariableManagerTestable`, `OCPP20RequestServiceTestable`) for unit testing private internals. Import from `__testable__/index.ts` barrel in tests only ## Python Conventions (tests/ocpp-server/) diff --git a/tests/TEST_STYLE_GUIDE.md b/tests/TEST_STYLE_GUIDE.md index 66818a0c..50cb7c26 100644 --- a/tests/TEST_STYLE_GUIDE.md +++ b/tests/TEST_STYLE_GUIDE.md @@ -228,6 +228,22 @@ const TEST_STATION_NAME = 'CS-TEST-001' Available constants: `tests/charging-station/ChargingStationTestConstants.ts` +### Direct Imports (No Re-Export Hubs) + +Import from the file that **defines** the symbol — never through an intermediate re-export file. + +```typescript +// ✅ Good - Direct to defining module +import { createMockChargingStation } from './helpers/StationHelpers.js' +import { standardCleanup } from '../helpers/TestLifecycleHelpers.js' +import { MockWebSocket } from './mocks/MockWebSocket.js' + +// ❌ Bad - Through re-export hub +import { createMockChargingStation, standardCleanup } from './ChargingStationTestUtils.js' +``` + +**Exception**: `src/` barrel imports (e.g., `src/types/index.js`) are the public API of production modules — use them as-is. + --- ## 7. Assertions diff --git a/tests/charging-station/AutomaticTransactionGenerator.test.ts b/tests/charging-station/AutomaticTransactionGenerator.test.ts index 3928f1c9..ba5bbae2 100644 --- a/tests/charging-station/AutomaticTransactionGenerator.test.ts +++ b/tests/charging-station/AutomaticTransactionGenerator.test.ts @@ -23,8 +23,8 @@ import { AutomaticTransactionGenerator } from '../../src/charging-station/Automa import { BaseError } from '../../src/exception/index.js' import { type StartTransactionResult } from '../../src/types/index.js' import { Constants } from '../../src/utils/Constants.js' -import { flushMicrotasks } from '../helpers/TestLifecycleHelpers.js' -import { createMockChargingStation, standardCleanup } from './ChargingStationTestUtils.js' +import { flushMicrotasks, standardCleanup } from '../helpers/TestLifecycleHelpers.js' +import { createMockChargingStation } from './helpers/StationHelpers.js' type ConnectorStatus = ReturnType diff --git a/tests/charging-station/ChargingStation-Configuration.test.ts b/tests/charging-station/ChargingStation-Configuration.test.ts index e233c4ad..ad7b0c2e 100644 --- a/tests/charging-station/ChargingStation-Configuration.test.ts +++ b/tests/charging-station/ChargingStation-Configuration.test.ts @@ -10,7 +10,7 @@ import type { ChargingStation } from '../../src/charging-station/index.js' import { AvailabilityType, RegistrationStatusEnumType } from '../../src/types/index.js' import { standardCleanup, withMockTimers } from '../helpers/TestLifecycleHelpers.js' import { TEST_HEARTBEAT_INTERVAL_MS, TEST_ONE_HOUR_MS } from './ChargingStationTestConstants.js' -import { cleanupChargingStation, createMockChargingStation } from './ChargingStationTestUtils.js' +import { cleanupChargingStation, createMockChargingStation } from './helpers/StationHelpers.js' await describe('ChargingStation Configuration Management', async () => { // ===== B02/B03 BOOT NOTIFICATION BEHAVIOR TESTS ===== diff --git a/tests/charging-station/ChargingStation-Connectors.test.ts b/tests/charging-station/ChargingStation-Connectors.test.ts index 98e65e56..894c5f13 100644 --- a/tests/charging-station/ChargingStation-Connectors.test.ts +++ b/tests/charging-station/ChargingStation-Connectors.test.ts @@ -11,7 +11,7 @@ import { resetConnectorStatus } from '../../src/charging-station/Helpers.js' import { RegistrationStatusEnumType } from '../../src/types/index.js' import { standardCleanup } from '../helpers/TestLifecycleHelpers.js' import { TEST_ONE_HOUR_MS } from './ChargingStationTestConstants.js' -import { cleanupChargingStation, createMockChargingStation } from './ChargingStationTestUtils.js' +import { cleanupChargingStation, createMockChargingStation } from './helpers/StationHelpers.js' await describe('ChargingStation Connector and EVSE State', async () => { await describe('Connector Query', async () => { diff --git a/tests/charging-station/ChargingStation-Lifecycle.test.ts b/tests/charging-station/ChargingStation-Lifecycle.test.ts index 076f68ff..4a299f97 100644 --- a/tests/charging-station/ChargingStation-Lifecycle.test.ts +++ b/tests/charging-station/ChargingStation-Lifecycle.test.ts @@ -8,7 +8,7 @@ import { afterEach, beforeEach, describe, it } from 'node:test' import type { ChargingStation } from '../../src/charging-station/index.js' import { standardCleanup } from '../helpers/TestLifecycleHelpers.js' -import { cleanupChargingStation, createMockChargingStation } from './ChargingStationTestUtils.js' +import { cleanupChargingStation, createMockChargingStation } from './helpers/StationHelpers.js' await describe('ChargingStation Lifecycle', async () => { await describe('Start/Stop Operations', async () => { diff --git a/tests/charging-station/ChargingStation-Resilience.test.ts b/tests/charging-station/ChargingStation-Resilience.test.ts index a5929b79..e31462ed 100644 --- a/tests/charging-station/ChargingStation-Resilience.test.ts +++ b/tests/charging-station/ChargingStation-Resilience.test.ts @@ -10,7 +10,7 @@ import type { ChargingStation } from '../../src/charging-station/index.js' import { RegistrationStatusEnumType, RequestCommand } from '../../src/types/index.js' import { standardCleanup } from '../helpers/TestLifecycleHelpers.js' import { TEST_HEARTBEAT_INTERVAL_MS } from './ChargingStationTestConstants.js' -import { cleanupChargingStation, createMockChargingStation } from './ChargingStationTestUtils.js' +import { cleanupChargingStation, createMockChargingStation } from './helpers/StationHelpers.js' await describe('ChargingStation Resilience', async () => { await describe('Error Recovery and Resilience', async () => { diff --git a/tests/charging-station/ChargingStation-Transactions.test.ts b/tests/charging-station/ChargingStation-Transactions.test.ts index d6d5c798..4e6cb488 100644 --- a/tests/charging-station/ChargingStation-Transactions.test.ts +++ b/tests/charging-station/ChargingStation-Transactions.test.ts @@ -16,7 +16,7 @@ import { withMockTimers, } from '../helpers/TestLifecycleHelpers.js' import { TEST_HEARTBEAT_INTERVAL_MS, TEST_ID_TAG } from './ChargingStationTestConstants.js' -import { cleanupChargingStation, createMockChargingStation } from './ChargingStationTestUtils.js' +import { cleanupChargingStation, createMockChargingStation } from './helpers/StationHelpers.js' await describe('ChargingStation Transaction Management', async () => { await describe('Transaction Query', async () => { diff --git a/tests/charging-station/ChargingStation.test.ts b/tests/charging-station/ChargingStation.test.ts index 023ab14e..7ea2edb2 100644 --- a/tests/charging-station/ChargingStation.test.ts +++ b/tests/charging-station/ChargingStation.test.ts @@ -21,14 +21,9 @@ import { TEST_TRANSACTION_ENERGY_WH, TEST_TRANSACTION_ID, } from './ChargingStationTestConstants.js' -import { - cleanupChargingStation, - createMockChargingStation, - MockIdTagsCache, - MockSharedLRUCache, - MockWebSocket, - WebSocketReadyState, -} from './ChargingStationTestUtils.js' +import { cleanupChargingStation, createMockChargingStation } from './helpers/StationHelpers.js' +import { MockIdTagsCache, MockSharedLRUCache } from './mocks/MockCaches.js' +import { MockWebSocket, WebSocketReadyState } from './mocks/MockWebSocket.js' await describe('ChargingStation', async () => { await describe('Test Utilities', async () => { diff --git a/tests/charging-station/ChargingStationTestUtils.ts b/tests/charging-station/ChargingStationTestUtils.ts deleted file mode 100644 index 72fe49ca..00000000 --- a/tests/charging-station/ChargingStationTestUtils.ts +++ /dev/null @@ -1,40 +0,0 @@ -/** - * Utilities for creating MOCK ChargingStation instances in tests - * - * This file provides factory functions to instantiate mock ChargingStation - * objects (lightweight stubs) with properly isolated dependencies for testing. - * - * Key patterns: - * - MockWebSocket: Captures sent messages for assertion - * - Singleton mocking: Overrides getInstance() for shared caches - * - Cleanup utilities: Prevents test pollution via timer/listener cleanup - * @see tests/charging-station/helpers/StationHelpers.ts for mock factory implementation - * @see tests/charging-station/ChargingStationTestConstants.ts for test constants - */ - -// Re-export test lifecycle helpers -export { - clearConnectorTransaction, - setupConnectorWithTransaction, - standardCleanup, -} from '../helpers/TestLifecycleHelpers.js' - -// Re-export all helper functions and types from StationHelpers -export { - type ChargingStationMocks, - cleanupChargingStation, - createConnectorStatus, - type CreateConnectorStatusOptions, - createMockChargingStation, - createMockChargingStationTemplate, - type MockChargingStation, - type MockChargingStationOptions, - type MockChargingStationResult, - type MockOCPPIncomingRequestService, - type MockOCPPRequestService, - resetChargingStationState, -} from './helpers/StationHelpers.js' - -export { MockIdTagsCache, MockSharedLRUCache } from './mocks/MockCaches.js' -// Re-export all mock classes -export { MockWebSocket, WebSocketReadyState } from './mocks/MockWebSocket.js' diff --git a/tests/charging-station/ConfigurationKeyUtils.test.ts b/tests/charging-station/ConfigurationKeyUtils.test.ts index 7e1d8fae..f395ff5a 100644 --- a/tests/charging-station/ConfigurationKeyUtils.test.ts +++ b/tests/charging-station/ConfigurationKeyUtils.test.ts @@ -17,7 +17,7 @@ import { import { OCPP20ComponentName, OCPPVersion, StandardParametersKey } from '../../src/types/index.js' import { logger } from '../../src/utils/index.js' import { standardCleanup } from '../helpers/TestLifecycleHelpers.js' -import { createMockChargingStation } from './ChargingStationTestUtils.js' +import { createMockChargingStation } from './helpers/StationHelpers.js' const TEST_KEY_1 = 'TestKey1' const MIXED_CASE_KEY = 'MiXeDkEy' diff --git a/tests/charging-station/Helpers.test.ts b/tests/charging-station/Helpers.test.ts index d407f541..8b45004d 100644 --- a/tests/charging-station/Helpers.test.ts +++ b/tests/charging-station/Helpers.test.ts @@ -42,7 +42,7 @@ import { TEST_CHARGING_STATION_BASE_NAME } from './ChargingStationTestConstants. import { createMockChargingStation, createMockChargingStationTemplate, -} from './ChargingStationTestUtils.js' +} from './helpers/StationHelpers.js' await describe('Helpers', async () => { let chargingStationTemplate: ChargingStationTemplate diff --git a/tests/charging-station/IdTagsCache.test.ts b/tests/charging-station/IdTagsCache.test.ts index 5e5bf081..82b92db3 100644 --- a/tests/charging-station/IdTagsCache.test.ts +++ b/tests/charging-station/IdTagsCache.test.ts @@ -21,7 +21,7 @@ import { getIdTagsFile } from '../../src/charging-station/Helpers.js' import { IdTagsCache } from '../../src/charging-station/IdTagsCache.js' import { IdTagDistribution } from '../../src/types/index.js' import { standardCleanup } from '../helpers/TestLifecycleHelpers.js' -import { createMockChargingStation } from './ChargingStationTestUtils.js' +import { createMockChargingStation } from './helpers/StationHelpers.js' const TEST_ID_TAGS = ['TAG-001', 'TAG-002', 'TAG-003'] const TEST_ID_TAGS_FILE = 'test-idtags.json' diff --git a/tests/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.test.ts b/tests/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.test.ts index 71da1cb8..a11413e5 100644 --- a/tests/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.test.ts +++ b/tests/charging-station/broadcast-channel/ChargingStationWorkerBroadcastChannel.test.ts @@ -27,7 +27,7 @@ import { import { Constants } from '../../../src/utils/index.js' import { flushMicrotasks, standardCleanup } from '../../helpers/TestLifecycleHelpers.js' import { TEST_TRANSACTION_ID_STRING } from '../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../helpers/StationHelpers.js' import { createMockStationWithRequestTracking } from '../ocpp/2.0/OCPP20TestUtils.js' // ============================================================================ diff --git a/tests/charging-station/ocpp/1.6/OCPP16IncomingRequestService-TriggerMessage.test.ts b/tests/charging-station/ocpp/1.6/OCPP16IncomingRequestService-TriggerMessage.test.ts index 861c8fab..a4f20409 100644 --- a/tests/charging-station/ocpp/1.6/OCPP16IncomingRequestService-TriggerMessage.test.ts +++ b/tests/charging-station/ocpp/1.6/OCPP16IncomingRequestService-TriggerMessage.test.ts @@ -24,7 +24,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { flushMicrotasks, standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { createOCPP16IncomingRequestTestContext, createOCPP16ListenerStation, diff --git a/tests/charging-station/ocpp/1.6/OCPP16Integration-Transactions.test.ts b/tests/charging-station/ocpp/1.6/OCPP16Integration-Transactions.test.ts index aace2bbb..ca478245 100644 --- a/tests/charging-station/ocpp/1.6/OCPP16Integration-Transactions.test.ts +++ b/tests/charging-station/ocpp/1.6/OCPP16Integration-Transactions.test.ts @@ -40,7 +40,7 @@ import { standardCleanup, } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME, TEST_ID_TAG } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' /** * Creates a shared station configured for cross-service integration tests, diff --git a/tests/charging-station/ocpp/1.6/OCPP16RequestService-CallChain.test.ts b/tests/charging-station/ocpp/1.6/OCPP16RequestService-CallChain.test.ts index 9d724e1f..ad2db1fb 100644 --- a/tests/charging-station/ocpp/1.6/OCPP16RequestService-CallChain.test.ts +++ b/tests/charging-station/ocpp/1.6/OCPP16RequestService-CallChain.test.ts @@ -23,7 +23,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' await describe('OCPP 1.6 Request Call Chain — requestHandler → buildRequestPayload → sendMessage', async () => { let requestService: OCPP16RequestService diff --git a/tests/charging-station/ocpp/1.6/OCPP16ResponseService-SimpleHandlers.test.ts b/tests/charging-station/ocpp/1.6/OCPP16ResponseService-SimpleHandlers.test.ts index fa540be7..a78b7895 100644 --- a/tests/charging-station/ocpp/1.6/OCPP16ResponseService-SimpleHandlers.test.ts +++ b/tests/charging-station/ocpp/1.6/OCPP16ResponseService-SimpleHandlers.test.ts @@ -9,7 +9,7 @@ import assert from 'node:assert/strict' import { afterEach, beforeEach, describe, it } from 'node:test' -import type { MockChargingStation } from '../../ChargingStationTestUtils.js' +import type { MockChargingStation } from '../../helpers/StationHelpers.js' import { OCPP16ResponseService } from '../../../../src/charging-station/ocpp/1.6/OCPP16ResponseService.js' import { @@ -26,7 +26,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { dispatchResponse } from './OCPP16TestUtils.js' /** diff --git a/tests/charging-station/ocpp/1.6/OCPP16ServiceUtils-MeterValues.test.ts b/tests/charging-station/ocpp/1.6/OCPP16ServiceUtils-MeterValues.test.ts index bfc4c8a4..0e61e1c3 100644 --- a/tests/charging-station/ocpp/1.6/OCPP16ServiceUtils-MeterValues.test.ts +++ b/tests/charging-station/ocpp/1.6/OCPP16ServiceUtils-MeterValues.test.ts @@ -17,7 +17,7 @@ import { OCPPVersion, } from '../../../../src/types/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { createMeterValuesTemplate } from './OCPP16TestUtils.js' await describe('OCPP16ServiceUtils — MeterValues', async () => { diff --git a/tests/charging-station/ocpp/1.6/OCPP16ServiceUtils-SignedMeterValues.test.ts b/tests/charging-station/ocpp/1.6/OCPP16ServiceUtils-SignedMeterValues.test.ts index 91f33e59..22beb41c 100644 --- a/tests/charging-station/ocpp/1.6/OCPP16ServiceUtils-SignedMeterValues.test.ts +++ b/tests/charging-station/ocpp/1.6/OCPP16ServiceUtils-SignedMeterValues.test.ts @@ -27,7 +27,7 @@ import { } from '../../../../src/types/index.js' import { standardCleanup, withMockTimers } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_PUBLIC_KEY_HEX } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { createMeterValuesTemplate, upsertConfigurationKey } from './OCPP16TestUtils.js' await describe('OCPP 1.6 — Signed MeterValues', async () => { diff --git a/tests/charging-station/ocpp/1.6/OCPP16ServiceUtils.test.ts b/tests/charging-station/ocpp/1.6/OCPP16ServiceUtils.test.ts index cc3d4f24..5178e5d1 100644 --- a/tests/charging-station/ocpp/1.6/OCPP16ServiceUtils.test.ts +++ b/tests/charging-station/ocpp/1.6/OCPP16ServiceUtils.test.ts @@ -39,7 +39,7 @@ import { } from '../../../../src/types/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME, TEST_ID_TAG } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { getTestAuthCache } from '../auth/helpers/MockFactories.js' import { createCommandsSupport } from './OCPP16TestUtils.js' diff --git a/tests/charging-station/ocpp/1.6/OCPP16TestUtils.ts b/tests/charging-station/ocpp/1.6/OCPP16TestUtils.ts index 490be5c4..c77b1ee6 100644 --- a/tests/charging-station/ocpp/1.6/OCPP16TestUtils.ts +++ b/tests/charging-station/ocpp/1.6/OCPP16TestUtils.ts @@ -43,7 +43,7 @@ import { createMockChargingStation, type MockChargingStation, type MockOCPPRequestService, -} from '../../ChargingStationTestUtils.js' +} from '../../helpers/StationHelpers.js' // ============================================================================ // Test Context Types diff --git a/tests/charging-station/ocpp/2.0/OCPP20CertSigningRetryManager.test.ts b/tests/charging-station/ocpp/2.0/OCPP20CertSigningRetryManager.test.ts index fe12d5a1..9884d90a 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20CertSigningRetryManager.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20CertSigningRetryManager.test.ts @@ -25,7 +25,7 @@ import { withMockTimers, } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { upsertConfigurationKey } from './OCPP20TestUtils.js' await describe('OCPP20CertSigningRetryManager', async () => { diff --git a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-CertificateSigned.test.ts b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-CertificateSigned.test.ts index f22f3e2b..ee58d328 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-CertificateSigned.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-CertificateSigned.test.ts @@ -26,7 +26,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { INVALID_PEM_CERTIFICATE_MISSING_MARKERS, VALID_CERTIFICATE_CHAIN, diff --git a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-ClearCache.test.ts b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-ClearCache.test.ts index 33693619..2c77a527 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-ClearCache.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-ClearCache.test.ts @@ -15,7 +15,7 @@ import { GenericStatus, OCPPVersion } from '../../../../src/types/index.js' import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' await describe('C11 - Clear Authorization Data in Authorization Cache', async () => { afterEach(() => { diff --git a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-CustomerInformation.test.ts b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-CustomerInformation.test.ts index ea8d0eb9..be8c6d08 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-CustomerInformation.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-CustomerInformation.test.ts @@ -22,7 +22,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { flushMicrotasks, standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' await describe('N32 - CustomerInformation', async () => { let station: ChargingStation diff --git a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-DataTransfer.test.ts b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-DataTransfer.test.ts index bd6d895d..2edb0e1b 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-DataTransfer.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-DataTransfer.test.ts @@ -14,7 +14,7 @@ import { DataTransferStatusEnumType, OCPPVersion } from '../../../../src/types/i import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' await describe('P01 - DataTransfer', async () => { let station: ChargingStation diff --git a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-DeleteCertificate.test.ts b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-DeleteCertificate.test.ts index 131818a8..bf67604c 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-DeleteCertificate.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-DeleteCertificate.test.ts @@ -22,7 +22,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { createMockCertificateManager, createStationWithCertificateManager, diff --git a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetBaseReport.test.ts b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetBaseReport.test.ts index 954bf0e2..e327a6bc 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetBaseReport.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetBaseReport.test.ts @@ -42,7 +42,7 @@ import { TEST_CHARGING_STATION_BASE_NAME, TEST_FIRMWARE_VERSION, } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' await describe('B07 - Get Base Report', async () => { let station: ChargingStation diff --git a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetInstalledCertificateIds.test.ts b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetInstalledCertificateIds.test.ts index f9f32bfc..dc2c9e45 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetInstalledCertificateIds.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetInstalledCertificateIds.test.ts @@ -22,7 +22,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { createMockCertificateHashDataChain, createMockCertificateManager, diff --git a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetLog.test.ts b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetLog.test.ts index 0a896fbe..b5f709e4 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetLog.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetLog.test.ts @@ -27,7 +27,7 @@ import { withMockTimers, } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { createMockStationWithRequestTracking } from './OCPP20TestUtils.js' await describe('K01 - GetLog', async () => { diff --git a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetTransactionStatus.test.ts b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetTransactionStatus.test.ts index 9e0ea95d..a43f7062 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetTransactionStatus.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetTransactionStatus.test.ts @@ -17,7 +17,7 @@ import { standardCleanup, } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' await describe('D14 - GetTransactionStatus', async () => { let station: ChargingStation diff --git a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetVariables.test.ts b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetVariables.test.ts index 52cdfdfe..4e0e8c70 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetVariables.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-GetVariables.test.ts @@ -27,7 +27,7 @@ import { TEST_CHARGING_STATION_BASE_NAME, TEST_CONNECTOR_ID_VALID_INSTANCE, } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { resetLimits, resetReportingValueSize, diff --git a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-InstallCertificate.test.ts b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-InstallCertificate.test.ts index 4793d4e8..c4f38d15 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-InstallCertificate.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-InstallCertificate.test.ts @@ -21,7 +21,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { EXPIRED_PEM_CERTIFICATE, INVALID_PEM_CERTIFICATE_MISSING_MARKERS, diff --git a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-LocalAuthList.test.ts b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-LocalAuthList.test.ts index a3b38184..4c10d69e 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-LocalAuthList.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-LocalAuthList.test.ts @@ -28,7 +28,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { upsertConfigurationKey } from './OCPP20TestUtils.js' await describe('OCPP20IncomingRequestService — LocalAuthList', async () => { diff --git a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-MasterPass.test.ts b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-MasterPass.test.ts index c9ee625c..710ac064 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-MasterPass.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-MasterPass.test.ts @@ -25,7 +25,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { createMockAuthService } from '../auth/helpers/MockFactories.js' import { resetConnectorTransactionState, diff --git a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RemoteStartAuth.test.ts b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RemoteStartAuth.test.ts index 02a6c7b4..6e3b8543 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RemoteStartAuth.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RemoteStartAuth.test.ts @@ -22,10 +22,7 @@ import { RequestStartStopStatusEnumType, } from '../../../../src/types/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' -import { - cleanupChargingStation, - createMockChargingStation, -} from '../../ChargingStationTestUtils.js' +import { cleanupChargingStation, createMockChargingStation } from '../../helpers/StationHelpers.js' await describe('G03 - Remote Start Pre-Authorization', async () => { let service: OCPP20IncomingRequestService | undefined diff --git a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RequestStartTransaction.test.ts b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RequestStartTransaction.test.ts index 7a632ca9..f0ad2fbf 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RequestStartTransaction.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RequestStartTransaction.test.ts @@ -43,7 +43,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { flushMicrotasks, standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { createMockAuthorizationResult, createMockAuthService, diff --git a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RequestStopTransaction.test.ts b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RequestStopTransaction.test.ts index 45ec0027..ab0e9086 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RequestStopTransaction.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-RequestStopTransaction.test.ts @@ -33,7 +33,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { flushMicrotasks, standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { createMockAuthService } from '../auth/helpers/MockFactories.js' import { createOCPP20ListenerStation, diff --git a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-Reset.test.ts b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-Reset.test.ts index 20d918fb..4cefedd0 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-Reset.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-Reset.test.ts @@ -11,7 +11,7 @@ import type { OCPP20ResetResponse, Reservation, } from '../../../../src/types/index.js' -import type { MockChargingStation } from '../../ChargingStationTestUtils.js' +import type { MockChargingStation } from '../../helpers/StationHelpers.js' import { createTestableIncomingRequestService } from '../../../../src/charging-station/ocpp/2.0/__testable__/index.js' import { OCPP20IncomingRequestService } from '../../../../src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.js' diff --git a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-SetNetworkProfile.test.ts b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-SetNetworkProfile.test.ts index 525bc75b..448ecee9 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-SetNetworkProfile.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-SetNetworkProfile.test.ts @@ -22,7 +22,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' await describe('B43 - SetNetworkProfile', async () => { let station: ChargingStation diff --git a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-SetVariables.test.ts b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-SetVariables.test.ts index 487bf2f9..be1da66c 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-SetVariables.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-SetVariables.test.ts @@ -31,7 +31,7 @@ import { TEST_CHARGING_STATION_BASE_NAME, TEST_CONNECTOR_ID_VALID_INSTANCE, } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { resetLimits, resetValueSizeLimits, diff --git a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-TriggerMessage.test.ts b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-TriggerMessage.test.ts index 7867bd8c..281e0d58 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-TriggerMessage.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-TriggerMessage.test.ts @@ -12,7 +12,7 @@ import type { OCPP20TriggerMessageResponse, RequestParams, } from '../../../../src/types/index.js' -import type { MockChargingStation } from '../../ChargingStationTestUtils.js' +import type { MockChargingStation } from '../../helpers/StationHelpers.js' import { createTestableIncomingRequestService } from '../../../../src/charging-station/ocpp/2.0/__testable__/index.js' import { OCPP20IncomingRequestService } from '../../../../src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.js' @@ -28,7 +28,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { flushMicrotasks, standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' /** * Create a mock station suitable for TriggerMessage tests. diff --git a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-UnlockConnector.test.ts b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-UnlockConnector.test.ts index 09d14464..b9f9af98 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-UnlockConnector.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-UnlockConnector.test.ts @@ -10,7 +10,7 @@ import type { OCPP20UnlockConnectorRequest, OCPP20UnlockConnectorResponse, } from '../../../../src/types/index.js' -import type { MockChargingStation } from '../../ChargingStationTestUtils.js' +import type { MockChargingStation } from '../../helpers/StationHelpers.js' import { createTestableIncomingRequestService } from '../../../../src/charging-station/ocpp/2.0/__testable__/index.js' import { OCPP20IncomingRequestService } from '../../../../src/charging-station/ocpp/2.0/OCPP20IncomingRequestService.js' @@ -23,7 +23,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' /** * Create a mock station suitable for UnlockConnector tests. diff --git a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-UpdateFirmware.test.ts b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-UpdateFirmware.test.ts index 4b120bb5..6a294c00 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-UpdateFirmware.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20IncomingRequestService-UpdateFirmware.test.ts @@ -28,7 +28,7 @@ import { withMockTimers, } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { createMockCertificateManager, createMockStationWithRequestTracking, diff --git a/tests/charging-station/ocpp/2.0/OCPP20Integration-Certificate.test.ts b/tests/charging-station/ocpp/2.0/OCPP20Integration-Certificate.test.ts index d4301e74..87ccc9ed 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20Integration-Certificate.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20Integration-Certificate.test.ts @@ -26,7 +26,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' /** @returns A mock station configured for certificate integration tests */ function createIntegrationStation (): ChargingStation { diff --git a/tests/charging-station/ocpp/2.0/OCPP20Integration.test.ts b/tests/charging-station/ocpp/2.0/OCPP20Integration.test.ts index c60c63a2..06423a27 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20Integration.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20Integration.test.ts @@ -28,7 +28,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { resetLimits } from './OCPP20TestUtils.js' /** @returns A mock station configured for integration tests */ diff --git a/tests/charging-station/ocpp/2.0/OCPP20RequestBuilders-SignedMeterValues.test.ts b/tests/charging-station/ocpp/2.0/OCPP20RequestBuilders-SignedMeterValues.test.ts index be06caa6..79c078ac 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20RequestBuilders-SignedMeterValues.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20RequestBuilders-SignedMeterValues.test.ts @@ -30,7 +30,7 @@ import { TEST_PUBLIC_KEY_HEX, TEST_TRANSACTION_ID_STRING, } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' const energyTemplate: SampledValueTemplate = { measurand: MeterValueMeasurand.ENERGY_ACTIVE_IMPORT_REGISTER, diff --git a/tests/charging-station/ocpp/2.0/OCPP20RequestService-CallChain.test.ts b/tests/charging-station/ocpp/2.0/OCPP20RequestService-CallChain.test.ts index 1d61794f..38b9848e 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20RequestService-CallChain.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20RequestService-CallChain.test.ts @@ -13,7 +13,7 @@ import { createTestableRequestService, type SendMessageMock, type TestableOCPP20RequestService, -} from '../../../../src/charging-station/ocpp/2.0/__testable__/OCPP20RequestServiceTestable.js' +} from '../../../../src/charging-station/ocpp/2.0/__testable__/index.js' import { ConnectorStatusEnum, OCPP20ConnectorStatusEnumType, @@ -27,7 +27,7 @@ import { import { Constants, generateUUID } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' await describe('OCPP 2.0 Request Call Chain — requestHandler → buildRequestPayload → sendMessage', async () => { let service: TestableOCPP20RequestService diff --git a/tests/charging-station/ocpp/2.0/OCPP20RequestService-DataTransfer.test.ts b/tests/charging-station/ocpp/2.0/OCPP20RequestService-DataTransfer.test.ts index 7f0b2481..4314c065 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20RequestService-DataTransfer.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20RequestService-DataTransfer.test.ts @@ -22,7 +22,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' await describe('P02 - DataTransfer', async () => { let station: ChargingStation diff --git a/tests/charging-station/ocpp/2.0/OCPP20RequestService-FirmwareStatusNotification.test.ts b/tests/charging-station/ocpp/2.0/OCPP20RequestService-FirmwareStatusNotification.test.ts index dada4577..c685c382 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20RequestService-FirmwareStatusNotification.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20RequestService-FirmwareStatusNotification.test.ts @@ -23,7 +23,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' await describe('J01 - FirmwareStatusNotification', async () => { let station: ChargingStation diff --git a/tests/charging-station/ocpp/2.0/OCPP20RequestService-HeartBeat.test.ts b/tests/charging-station/ocpp/2.0/OCPP20RequestService-HeartBeat.test.ts index fa326ddf..d2e1fc74 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20RequestService-HeartBeat.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20RequestService-HeartBeat.test.ts @@ -21,7 +21,7 @@ import { TEST_CHARGING_STATION_BASE_NAME, TEST_FIRMWARE_VERSION, } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { createOCPP20RequestTestContext, type TestableOCPP20RequestService, diff --git a/tests/charging-station/ocpp/2.0/OCPP20RequestService-ISO15118.test.ts b/tests/charging-station/ocpp/2.0/OCPP20RequestService-ISO15118.test.ts index ef3498f7..0985f864 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20RequestService-ISO15118.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20RequestService-ISO15118.test.ts @@ -24,7 +24,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { createMockOCSPRequestData } from './OCPP20TestUtils.js' // Sample Base64 EXI request (mock - represents CertificateInstallationReq) const MOCK_EXI_REQUEST = 'SGVsbG8gV29ybGQgRVhJIFJlcXVlc3Q=' diff --git a/tests/charging-station/ocpp/2.0/OCPP20RequestService-LogStatusNotification.test.ts b/tests/charging-station/ocpp/2.0/OCPP20RequestService-LogStatusNotification.test.ts index cc4612e0..cb411a89 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20RequestService-LogStatusNotification.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20RequestService-LogStatusNotification.test.ts @@ -23,7 +23,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' await describe('M04 - LogStatusNotification', async () => { let station: ChargingStation diff --git a/tests/charging-station/ocpp/2.0/OCPP20RequestService-MeterValues.test.ts b/tests/charging-station/ocpp/2.0/OCPP20RequestService-MeterValues.test.ts index 9b1ad5e6..9f8bdfd1 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20RequestService-MeterValues.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20RequestService-MeterValues.test.ts @@ -22,7 +22,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' await describe('G01 - MeterValues', async () => { let station: ChargingStation diff --git a/tests/charging-station/ocpp/2.0/OCPP20RequestService-NotifyReport.test.ts b/tests/charging-station/ocpp/2.0/OCPP20RequestService-NotifyReport.test.ts index f9c4dd95..03bc7dbf 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20RequestService-NotifyReport.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20RequestService-NotifyReport.test.ts @@ -32,7 +32,7 @@ import { TEST_CHARGING_STATION_BASE_NAME, TEST_FIRMWARE_VERSION, } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' await describe('B07/B08 - NotifyReport', async () => { let testableService: TestableOCPP20RequestService diff --git a/tests/charging-station/ocpp/2.0/OCPP20RequestService-SecurityEventNotification.test.ts b/tests/charging-station/ocpp/2.0/OCPP20RequestService-SecurityEventNotification.test.ts index e9c4b1d5..373967ed 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20RequestService-SecurityEventNotification.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20RequestService-SecurityEventNotification.test.ts @@ -21,7 +21,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' await describe('A04 - SecurityEventNotification', async () => { let station: ChargingStation diff --git a/tests/charging-station/ocpp/2.0/OCPP20RequestService-SignCertificate.test.ts b/tests/charging-station/ocpp/2.0/OCPP20RequestService-SignCertificate.test.ts index 4ad278be..9f33b0bd 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20RequestService-SignCertificate.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20RequestService-SignCertificate.test.ts @@ -22,7 +22,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' const MOCK_ORGANIZATION_NAME = 'Test Organization Inc.' diff --git a/tests/charging-station/ocpp/2.0/OCPP20ResponseService-BootNotification.test.ts b/tests/charging-station/ocpp/2.0/OCPP20ResponseService-BootNotification.test.ts index b8d36afe..a5d43d37 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20ResponseService-BootNotification.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20ResponseService-BootNotification.test.ts @@ -15,7 +15,7 @@ import assert from 'node:assert/strict' import { afterEach, beforeEach, describe, it, mock } from 'node:test' -import type { MockChargingStation } from '../../ChargingStationTestUtils.js' +import type { MockChargingStation } from '../../helpers/StationHelpers.js' import { buildConfigKey } from '../../../../src/charging-station/index.js' import { OCPP20ResponseService } from '../../../../src/charging-station/ocpp/2.0/OCPP20ResponseService.js' @@ -31,7 +31,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' /** * Create a mock station suitable for BootNotification response tests. diff --git a/tests/charging-station/ocpp/2.0/OCPP20ResponseService-CacheUpdate.test.ts b/tests/charging-station/ocpp/2.0/OCPP20ResponseService-CacheUpdate.test.ts index b4d7cf22..677af93a 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20ResponseService-CacheUpdate.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20ResponseService-CacheUpdate.test.ts @@ -22,7 +22,7 @@ import { TEST_CHARGING_STATION_BASE_NAME, TEST_TOKEN_ISO14443, } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { getTestAuthCache } from '../auth/helpers/MockFactories.js' await describe('C10 - TransactionEventResponse Cache Update', async () => { diff --git a/tests/charging-station/ocpp/2.0/OCPP20ResponseService-SimpleHandlers.test.ts b/tests/charging-station/ocpp/2.0/OCPP20ResponseService-SimpleHandlers.test.ts index a370e835..cb348d0c 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20ResponseService-SimpleHandlers.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20ResponseService-SimpleHandlers.test.ts @@ -6,7 +6,7 @@ import assert from 'node:assert/strict' import { afterEach, beforeEach, describe, it, mock } from 'node:test' -import type { MockChargingStation } from '../../ChargingStationTestUtils.js' +import type { MockChargingStation } from '../../helpers/StationHelpers.js' import { OCPP20ResponseService } from '../../../../src/charging-station/ocpp/2.0/OCPP20ResponseService.js' import { @@ -19,7 +19,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' /** * Create a mock station suitable for simple response handler tests. diff --git a/tests/charging-station/ocpp/2.0/OCPP20ResponseService-TransactionEvent.test.ts b/tests/charging-station/ocpp/2.0/OCPP20ResponseService-TransactionEvent.test.ts index c992b065..daaec841 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20ResponseService-TransactionEvent.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20ResponseService-TransactionEvent.test.ts @@ -32,7 +32,7 @@ import { TEST_CHARGING_STATION_BASE_NAME, TEST_TRANSACTION_UUID, } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' interface TestableOCPP20ResponseService { handleResponseTransactionEvent: ( diff --git a/tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-AuthCache.test.ts b/tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-AuthCache.test.ts index bd88541b..502b019c 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-AuthCache.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-AuthCache.test.ts @@ -27,7 +27,7 @@ import { TEST_CHARGING_STATION_BASE_NAME, TEST_TOKEN_ISO14443, } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { getTestAuthCache } from '../auth/helpers/MockFactories.js' await describe('OCPP20ServiceUtils.updateAuthorizationCache', async () => { diff --git a/tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-ReconnectDelay.test.ts b/tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-ReconnectDelay.test.ts index 0b85e221..16a4e337 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-ReconnectDelay.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-ReconnectDelay.test.ts @@ -19,7 +19,7 @@ import { } from '../../../../src/types/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { upsertConfigurationKey } from './OCPP20TestUtils.js' const DEFAULT_WAIT_MINIMUM_SECONDS = 30 diff --git a/tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-StatusNotification.test.ts b/tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-StatusNotification.test.ts index 1543f643..32dcbd3f 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-StatusNotification.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-StatusNotification.test.ts @@ -19,7 +19,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' await describe('OCPP20ServiceUtils', async () => { let mockStation: ChargingStation diff --git a/tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-TransactionEvent.test.ts b/tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-TransactionEvent.test.ts index d8c93355..5222feca 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-TransactionEvent.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20ServiceUtils-TransactionEvent.test.ts @@ -50,7 +50,7 @@ import { withMockTimers, } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { type CapturedOCPPRequest, createMockStationWithRequestTracking, diff --git a/tests/charging-station/ocpp/2.0/OCPP20TestUtils.ts b/tests/charging-station/ocpp/2.0/OCPP20TestUtils.ts index e9950d8e..cd9aac1c 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20TestUtils.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20TestUtils.ts @@ -37,7 +37,7 @@ import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConsta import { createMockChargingStation, type MockChargingStation, -} from '../../ChargingStationTestUtils.js' +} from '../../helpers/StationHelpers.js' // ============================================================================ // Testable Interfaces diff --git a/tests/charging-station/ocpp/2.0/OCPP20VariableManager.test.ts b/tests/charging-station/ocpp/2.0/OCPP20VariableManager.test.ts index ead290f8..dda53fac 100644 --- a/tests/charging-station/ocpp/2.0/OCPP20VariableManager.test.ts +++ b/tests/charging-station/ocpp/2.0/OCPP20VariableManager.test.ts @@ -37,7 +37,7 @@ import { import { Constants } from '../../../../src/utils/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { resetReportingValueSize, resetValueSizeLimits, diff --git a/tests/charging-station/ocpp/OCPPServiceOperations.test.ts b/tests/charging-station/ocpp/OCPPServiceOperations.test.ts index 8154038c..439c6fc8 100644 --- a/tests/charging-station/ocpp/OCPPServiceOperations.test.ts +++ b/tests/charging-station/ocpp/OCPPServiceOperations.test.ts @@ -27,7 +27,7 @@ import { setupConnectorWithTransaction, standardCleanup, } from '../../helpers/TestLifecycleHelpers.js' -import { createMockChargingStation } from '../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../helpers/StationHelpers.js' import { createMockAuthorizationResult, createMockAuthService, diff --git a/tests/charging-station/ocpp/OCPPServiceUtils-meterValues.test.ts b/tests/charging-station/ocpp/OCPPServiceUtils-meterValues.test.ts index 0255a302..0ad928cc 100644 --- a/tests/charging-station/ocpp/OCPPServiceUtils-meterValues.test.ts +++ b/tests/charging-station/ocpp/OCPPServiceUtils-meterValues.test.ts @@ -32,7 +32,7 @@ import { TEST_TRANSACTION_ID, TEST_TRANSACTION_ID_STRING, } from '../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../helpers/StationHelpers.js' const energyTemplate: SampledValueTemplate = { measurand: MeterValueMeasurand.ENERGY_ACTIVE_IMPORT_REGISTER, diff --git a/tests/charging-station/ocpp/auth/OCPPAuthIntegration.test.ts b/tests/charging-station/ocpp/auth/OCPPAuthIntegration.test.ts index 7cbcca27..f2a66496 100644 --- a/tests/charging-station/ocpp/auth/OCPPAuthIntegration.test.ts +++ b/tests/charging-station/ocpp/auth/OCPPAuthIntegration.test.ts @@ -19,7 +19,7 @@ import { } from '../../../../src/charging-station/ocpp/auth/types/AuthTypes.js' import { OCPPVersion } from '../../../../src/types/index.js' import { standardCleanup } from '../../../helpers/TestLifecycleHelpers.js' -import { createMockChargingStation } from '../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../helpers/StationHelpers.js' import { createMockAuthRequest, createMockIdentifier, diff --git a/tests/charging-station/ocpp/auth/factories/AuthComponentFactory.test.ts b/tests/charging-station/ocpp/auth/factories/AuthComponentFactory.test.ts index 8ed50c5f..099b3b53 100644 --- a/tests/charging-station/ocpp/auth/factories/AuthComponentFactory.test.ts +++ b/tests/charging-station/ocpp/auth/factories/AuthComponentFactory.test.ts @@ -12,7 +12,7 @@ import { AuthComponentFactory } from '../../../../../src/charging-station/ocpp/a import { OCPPVersion } from '../../../../../src/types/index.js' import { standardCleanup } from '../../../../helpers/TestLifecycleHelpers.js' import { TEST_AUTHORIZATION_TIMEOUT_MS } from '../../../ChargingStationTestConstants.js' -import { createMockChargingStation } from '../../../ChargingStationTestUtils.js' +import { createMockChargingStation } from '../../../helpers/StationHelpers.js' await describe('AuthComponentFactory', async () => { afterEach(() => { diff --git a/tests/helpers/TestLifecycleHelpers.ts b/tests/helpers/TestLifecycleHelpers.ts index 0d11ab68..e3a5f8b5 100644 --- a/tests/helpers/TestLifecycleHelpers.ts +++ b/tests/helpers/TestLifecycleHelpers.ts @@ -30,7 +30,7 @@ import { mock } from 'node:test' import type { ChargingStation } from '../../src/charging-station/index.js' import type { MockChargingStationOptions } from '../charging-station/helpers/StationHelpers.js' -import { createMockChargingStation } from '../charging-station/ChargingStationTestUtils.js' +import { createMockChargingStation } from '../charging-station/helpers/StationHelpers.js' import { MockIdTagsCache, MockSharedLRUCache } from '../charging-station/mocks/MockCaches.js' /** diff --git a/tests/utils/ChargingStationConfigurationUtils.test.ts b/tests/utils/ChargingStationConfigurationUtils.test.ts index 0a9eff82..0fefb460 100644 --- a/tests/utils/ChargingStationConfigurationUtils.test.ts +++ b/tests/utils/ChargingStationConfigurationUtils.test.ts @@ -24,7 +24,7 @@ import { Constants } from '../../src/utils/Constants.js' import { cleanupChargingStation, createMockChargingStation, -} from '../charging-station/ChargingStationTestUtils.js' +} from '../charging-station/helpers/StationHelpers.js' import { standardCleanup } from '../helpers/TestLifecycleHelpers.js' /** diff --git a/tests/utils/ErrorUtils.test.ts b/tests/utils/ErrorUtils.test.ts index efd50a59..fab07259 100644 --- a/tests/utils/ErrorUtils.test.ts +++ b/tests/utils/ErrorUtils.test.ts @@ -24,7 +24,7 @@ import { } from '../../src/utils/ErrorUtils.js' import { logger } from '../../src/utils/index.js' import { TEST_CHARGING_STATION_BASE_NAME } from '../charging-station/ChargingStationTestConstants.js' -import { createMockChargingStation } from '../charging-station/ChargingStationTestUtils.js' +import { createMockChargingStation } from '../charging-station/helpers/StationHelpers.js' import { createConsoleMocks, createLoggerMocks, diff --git a/tests/utils/MessageChannelUtils.test.ts b/tests/utils/MessageChannelUtils.test.ts index d4c988ef..532be1e2 100644 --- a/tests/utils/MessageChannelUtils.test.ts +++ b/tests/utils/MessageChannelUtils.test.ts @@ -22,7 +22,7 @@ import { import { cleanupChargingStation, createMockChargingStation, -} from '../charging-station/ChargingStationTestUtils.js' +} from '../charging-station/helpers/StationHelpers.js' import { standardCleanup } from '../helpers/TestLifecycleHelpers.js' await describe('MessageChannelUtils', async () => { diff --git a/ui/web/src/composables/index.ts b/ui/web/src/composables/index.ts index 89c171c8..cfcc50e4 100644 --- a/ui/web/src/composables/index.ts +++ b/ui/web/src/composables/index.ts @@ -26,4 +26,5 @@ export { useExecuteAction, useTemplates, useUIClient, + validateUUID, } from './Utils' diff --git a/ui/web/tests/unit/CSConnector.test.ts b/ui/web/tests/unit/CSConnector.test.ts index a24f7969..9ea0e535 100644 --- a/ui/web/tests/unit/CSConnector.test.ts +++ b/ui/web/tests/unit/CSConnector.test.ts @@ -8,8 +8,7 @@ import { beforeEach, describe, expect, it, vi } from 'vitest' import type { UIClient } from '@/composables' import CSConnector from '@/components/charging-stations/CSConnector.vue' -import { useUIClient } from '@/composables' -import { EMPTY_VALUE_PLACEHOLDER } from '@/composables/Constants' +import { EMPTY_VALUE_PLACEHOLDER, useUIClient } from '@/composables' import { OCPP16ChargePointStatus } from '@/types' import { toastMock } from '../setup' diff --git a/ui/web/tests/unit/CSData.test.ts b/ui/web/tests/unit/CSData.test.ts index 900d472b..35cb78d3 100644 --- a/ui/web/tests/unit/CSData.test.ts +++ b/ui/web/tests/unit/CSData.test.ts @@ -10,8 +10,7 @@ import type { ChargingStationData } from '@/types' import CSConnector from '@/components/charging-stations/CSConnector.vue' import CSData from '@/components/charging-stations/CSData.vue' -import { useUIClient } from '@/composables' -import { EMPTY_VALUE_PLACEHOLDER } from '@/composables/Constants' +import { EMPTY_VALUE_PLACEHOLDER, useUIClient } from '@/composables' import { OCPPVersion } from '@/types' import { toastMock } from '../setup' diff --git a/ui/web/tests/unit/UIClient.test.ts b/ui/web/tests/unit/UIClient.test.ts index 87797021..10caca44 100644 --- a/ui/web/tests/unit/UIClient.test.ts +++ b/ui/web/tests/unit/UIClient.test.ts @@ -5,7 +5,7 @@ */ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' -import { UIClient } from '@/composables/UIClient' +import { UIClient } from '@/composables' import { AuthenticationType, OCPP20TransactionEventEnumType, diff --git a/ui/web/tests/unit/Utils.test.ts b/ui/web/tests/unit/Utils.test.ts index d5fefcb7..3637c5c3 100644 --- a/ui/web/tests/unit/Utils.test.ts +++ b/ui/web/tests/unit/Utils.test.ts @@ -16,7 +16,7 @@ import { setToLocalStorage, useExecuteAction, validateUUID, -} from '@/composables/Utils' +} from '@/composables' import { toastMock } from '../setup' -- 2.43.0