refactor(simulator): rename checkTemplateFile() -> checkTemplate()
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 24 May 2023 18:58:59 +0000 (20:58 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 24 May 2023 18:58:59 +0000 (20:58 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ChargingStation.ts
src/charging-station/ChargingStationUtils.ts

index 311df3fd90453058a4dd4505f3eee6d25135dc49..f47952ca9cf4b326c4a98121aec3f8d044f6ca82 100644 (file)
@@ -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`
index 6fde11e2f0c79aaeda0420673123da2552cc07d3..a329eb53c9383cefce2a7aca2c2c788c29ba88ce 100644 (file)
@@ -145,7 +145,7 @@ export class ChargingStationUtils {
     return connectorBootStatus;
   }
 
-  public static checkTemplateFile(
+  public static checkTemplate(
     stationTemplate: ChargingStationTemplate,
     logPrefix: string,
     templateFile: string