From: Jérôme Benoit Date: Wed, 24 May 2023 18:58:59 +0000 (+0200) Subject: refactor(simulator): rename checkTemplateFile() -> checkTemplate() X-Git-Tag: v1.2.14~16 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=e1893686e24bb1abad28b19da833576b1d0e49db;p=e-mobility-charging-stations-simulator.git refactor(simulator): rename checkTemplateFile() -> checkTemplate() Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 311df3fd..f47952ca 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -951,7 +951,7 @@ export class ChargingStation { private getStationInfoFromTemplate(): ChargingStationInfo { const stationTemplate: ChargingStationTemplate | undefined = this.getTemplateFromFile(); - ChargingStationUtils.checkTemplateFile(stationTemplate, this.logPrefix(), this.templateFile); + ChargingStationUtils.checkTemplate(stationTemplate, this.logPrefix(), this.templateFile); ChargingStationUtils.warnTemplateKeysDeprecation( stationTemplate, this.logPrefix(), @@ -1066,7 +1066,7 @@ export class ChargingStation { private initialize(): void { const stationTemplate = this.getTemplateFromFile(); - ChargingStationUtils.checkTemplateFile(stationTemplate, this.logPrefix(), this.templateFile); + ChargingStationUtils.checkTemplate(stationTemplate, this.logPrefix(), this.templateFile); this.configurationFile = path.join( path.dirname(this.templateFile.replace('station-templates', 'configurations')), `${ChargingStationUtils.getHashId(this.index, stationTemplate)}.json` diff --git a/src/charging-station/ChargingStationUtils.ts b/src/charging-station/ChargingStationUtils.ts index 6fde11e2..a329eb53 100644 --- a/src/charging-station/ChargingStationUtils.ts +++ b/src/charging-station/ChargingStationUtils.ts @@ -145,7 +145,7 @@ export class ChargingStationUtils { return connectorBootStatus; } - public static checkTemplateFile( + public static checkTemplate( stationTemplate: ChargingStationTemplate, logPrefix: string, templateFile: string