Examples of guestFileEncoding()


Examples of com.baidu.qa.service.test.util.FileCharsetDetector.guestFileEncoding()

   * @return
   */
  public Object requestHttpByHttpClient(File file, Config config, VariableGenerator vargen) {
    FileCharsetDetector det = new FileCharsetDetector();
    try {
      String oldcharset = det.guestFileEncoding(file);
      if (oldcharset.equalsIgnoreCase("UTF-8") == false)
        FileUtil.transferFile(file, oldcharset, "UTF-8");
    } catch (Exception ex) {
      log.error("[change expect file charset error]:" + ex);
    }
View Full Code Here

Examples of com.baidu.qa.service.test.util.FileCharsetDetector.guestFileEncoding()

 
 
  public boolean setTestDataWithSql(File file,Config config) {
    FileCharsetDetector det = new FileCharsetDetector();
    try{
      String oldcharset = det.guestFileEncoding(file);
      if(oldcharset.equalsIgnoreCase("UTF-8") == false)
      FileUtil.transferFile(file, oldcharset, "UTF-8");
    }catch(Exception ex){
      log.error("[change expect file charset error]:"+ex);
    }
View Full Code Here

Examples of com.baidu.qa.service.test.util.FileCharsetDetector.guestFileEncoding()

 
 
  public boolean setTestDataWithCsvFile(File file,Config config){
    FileCharsetDetector det = new FileCharsetDetector();
    try{
      String oldcharset = det.guestFileEncoding(file);
      if(oldcharset.equalsIgnoreCase("UTF-8") == false)
      FileUtil.transferFile(file, oldcharset, "UTF-8");
    }catch(Exception ex){
      log.error("[change expect file charset error]:"+ex);
    }
View Full Code Here

Examples of com.baidu.qa.service.test.util.FileCharsetDetector.guestFileEncoding()

   * @param vargen
   */
  public void selectVar(File file, Config config, VariableGenerator vargen) {
    FileCharsetDetector det = new FileCharsetDetector();
    try {
      String oldcharset = det.guestFileEncoding(file);
      if (oldcharset.equalsIgnoreCase("UTF-8") == false)
        FileUtil.transferFile(file, oldcharset, "UTF-8");
    } catch (Exception ex) {
      log.error("[change expect file charset error]:" + ex);
    }
View Full Code Here

Examples of com.baidu.qa.service.test.util.FileCharsetDetector.guestFileEncoding()

   
   
    FileCharsetDetector det = new FileCharsetDetector();
    String expectedStr = FileUtil.readFileByLines(expectfile);
    try{
      String oldcharset = det.guestFileEncoding(expectfile);
      if(oldcharset.equalsIgnoreCase("UTF-8") == false)
      FileUtil.transferFile(expectfile, oldcharset, "UTF-8");
    }catch(Exception ex){
      log.error("[change expect file charset error]:"+ex);
    }
View Full Code Here

Examples of com.baidu.qa.service.test.util.FileCharsetDetector.guestFileEncoding()

 

  public void verifyMysqlDataByCsvFile(File file,Config config) {
    FileCharsetDetector det = new FileCharsetDetector();
    try{
      String oldcharset = det.guestFileEncoding(file);
      if(oldcharset.equalsIgnoreCase("UTF-8") == false)
      FileUtil.transferFile(file, oldcharset, "UTF-8");
    }catch(Exception ex){
      log.error("[change expect file charset error]:"+ex);
    }
View Full Code Here

Examples of com.baidu.qa.service.test.util.FileCharsetDetector.guestFileEncoding()


  public void verifyMysqlDataBySqlFile(File file, Config config) {
    FileCharsetDetector det = new FileCharsetDetector();
    try{
      String oldcharset = det.guestFileEncoding(file);
      if(oldcharset.equalsIgnoreCase("UTF-8") == false)
      FileUtil.transferFile(file, oldcharset, "UTF-8");
    }catch(Exception ex){
      log.error("[change expect file charset error]:"+ex);
    }
View Full Code Here

Examples of com.baidu.qa.service.test.util.FileCharsetDetector.guestFileEncoding()

      }
     
      if (inputfile != null) {
        FileCharsetDetector det = new FileCharsetDetector();
        try {
          String oldcharset = det.guestFileEncoding(inputfile);
          if (oldcharset.equalsIgnoreCase("UTF-8") == false)
            FileUtil.transferFile(inputfile, oldcharset, "UTF-8");
        } catch (Exception ex) {
          log.error("[change expect file charset error]:" + ex);
          throw new RuntimeException("change expect file charset error", ex.getCause());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.