Coverage Report - com.ctrip.framework.apollo.core.enums.EnvUtils
 
Classes in this File Line Coverage Branch Coverage Complexity
EnvUtils
0%
0/11
0%
0/34
17
 
 1  
 package com.ctrip.framework.apollo.core.enums;
 2  
 
 3  
 import com.ctrip.framework.apollo.core.utils.StringUtils;
 4  
 
 5  0
 public final class EnvUtils {
 6  
   
 7  
   public static Env transformEnv(String envName) {
 8  0
     if (StringUtils.isBlank(envName)) {
 9  0
       return null;
 10  
     }
 11  0
     switch (envName.toUpperCase()) {
 12  
       case "LPT":
 13  0
         return Env.LPT;
 14  
       case "FAT":
 15  
       case "FWS":
 16  0
         return Env.FAT;
 17  
       case "UAT":
 18  0
         return Env.UAT;
 19  
       case "PRO":
 20  
       case "PROD": //just in case
 21  0
         return Env.PRO;
 22  
       case "DEV":
 23  0
         return Env.DEV;
 24  
       case "LOCAL":
 25  0
         return Env.LOCAL;
 26  
       default:
 27  0
         return null;
 28  
     }
 29  
   }
 30  
 }