} from '../../../../src/types/index.js'
import { OCPP20IdTokenEnumType } from '../../../../src/types/ocpp/2.0/Transaction.js'
import { Constants } from '../../../../src/utils/index.js'
-import { createChargingStation } from '../../../ChargingStationFactory.js'
import { TEST_CHARGING_STATION_BASE_NAME } from '../../ChargingStationTestConstants.js'
+import { createMockChargingStation } from '../../ChargingStationTestUtils.js'
// ============================================================================
// Testable Interfaces
* @returns ChargingStation configured for OCPP 2.0 transaction testing
*/
export function createMockOCPP20TransactionTestStation (): ChargingStation {
- return createChargingStation({
+ const { station } = createMockChargingStation({
baseName: TEST_CHARGING_STATION_BASE_NAME,
connectorsCount: 3,
evseConfiguration: { evsesCount: 3 },
},
websocketPingInterval: Constants.DEFAULT_WEBSOCKET_PING_INTERVAL,
})
+ return station
}
/**
}
)
- const station = createChargingStation({
+ const { station } = createMockChargingStation({
baseName: TEST_CHARGING_STATION_BASE_NAME,
connectorsCount: 3,
evseConfiguration: { evsesCount: 3 },
* @returns ChargingStation with certificateManager property properly typed
* @example
* ```typescript
- * const station = createStationWithCertificateManager(
- * createChargingStation({ ocppVersion: OCPPVersion.VERSION_201 }),
+ * const { station } = createMockChargingStation({
+ * stationInfo: { ocppVersion: OCPPVersion.VERSION_201 }
+ * })
+ * const stationWithCerts = createStationWithCertificateManager(
+ * station,
* createMockCertificateManager()
* )
* ```