@Test(expectedExceptions = FileNotFoundException.class, expectedExceptionsMessageRegExp = "sahi folder .* does not exist!") public void testCheckSahiProxyHomeAndSetContextVariablesFolderMissing() throws Exception { SakuliFolderHelper.checkSahiProxyHomeAndSetContextVariables("not-valid-path/to-sahi-home", ""); }
public static String checkSahiProxyHomeAndSetContextVariables(String sahiProxyHomePath, String tempLogCache) throws FileNotFoundException { Path sahiFolder = normalizePath(sahiProxyHomePath); if (sahiFolder == null || !Files.exists(sahiFolder)) { throw new FileNotFoundException("sahi folder \"" + sahiProxyHomePath + "\" does not exist!"); } SakuliPropertyPlaceholderConfigurer.SAHI_HOME_VALUE = sahiFolder.toString(); return tempLogCache + "\nset property '" + SahiProxyProperties.PROXY_HOME_FOLDER + "' to \"" + SakuliPropertyPlaceholderConfigurer.SAHI_HOME_VALUE + "\""; }
SakuliFolderHelper { public static String checkSahiProxyHomeAndSetContextVariables(String sahiProxyHomePath, String tempLogCache) throws FileNotFoundException { Path sahiFolder = normalizePath(sahiProxyHomePath); if (sahiFolder == null || !Files.exists(sahiFolder)) { throw new FileNotFoundException("sahi folder \"" + sahiProxyHomePath + "\" does not exist!"); } SakuliPropertyPlaceholderConfigurer.SAHI_HOME_VALUE = sahiFolder.toString(); return tempLogCache + "\nset property '" + SahiProxyProperties.PROXY_HOME_FOLDER + "' to \"" + SakuliPropertyPlaceholderConfigurer.SAHI_HOME_VALUE + "\""; } }
SakuliFolderHelper { public static String checkSahiProxyHomeAndSetContextVariables(String sahiProxyHomePath, String tempLogCache) throws FileNotFoundException { Path sahiFolder = normalizePath(sahiProxyHomePath); if (sahiFolder == null || !Files.exists(sahiFolder)) { throw new FileNotFoundException("sahi folder \"" + sahiProxyHomePath + "\" does not exist!"); } SakuliPropertyPlaceholderConfigurer.SAHI_HOME_VALUE = sahiFolder.toString(); return tempLogCache + "\nset property '" + SahiProxyProperties.PROXY_HOME_FOLDER + "' to \"" + SakuliPropertyPlaceholderConfigurer.SAHI_HOME_VALUE + "\""; }  }
SakuliFolderHelper { public static String checkSahiProxyHomeAndSetContextVariables(String sahiProxyHomePath, String tempLogCache) throws FileNotFoundException { Path sahiFolder = normalizePath(sahiProxyHomePath); if (sahiFolder == null || !Files.exists(sahiFolder)) { throw new FileNotFoundException("sahi folder \"" + sahiProxyHomePath + "\" does not exist!"); } SakuliPropertyPlaceholderConfigurer.SAHI_HOME_VALUE = sahiFolder.toString(); return tempLogCache + "\nset property '" + SahiProxyProperties.PROXY_HOME_FOLDER + "' to \"" + SakuliPropertyPlaceholderConfigurer.SAHI_HOME_VALUE + "\""; }  static String checkTestSuiteFolderAndSetContextVariables(String testSuiteFolderPath, String tempLogCache); static Path normalizePath(String path); static String checkSakuliHomeFolderAndSetContextVariables(String sakuliMainFolderPath, String tempLogCache); static String checkSahiProxyHomeAndSetContextVariables(String sahiProxyHomePath, String tempLogCache); static String setTestSuiteBrowserContextVariable(String testSuiteBrowserName, String tempLogCache); }
SakuliFolderHelper { public static String checkSahiProxyHomeAndSetContextVariables(String sahiProxyHomePath, String tempLogCache) throws FileNotFoundException { Path sahiFolder = normalizePath(sahiProxyHomePath); if (sahiFolder == null || !Files.exists(sahiFolder)) { throw new FileNotFoundException("sahi folder \"" + sahiProxyHomePath + "\" does not exist!"); } SakuliPropertyPlaceholderConfigurer.SAHI_HOME_VALUE = sahiFolder.toString(); return tempLogCache + "\nset property '" + SahiProxyProperties.PROXY_HOME_FOLDER + "' to \"" + SakuliPropertyPlaceholderConfigurer.SAHI_HOME_VALUE + "\""; }  static String checkTestSuiteFolderAndSetContextVariables(String testSuiteFolderPath, String tempLogCache); static Path normalizePath(String path); static String checkSakuliHomeFolderAndSetContextVariables(String sakuliMainFolderPath, String tempLogCache); static String checkSahiProxyHomeAndSetContextVariables(String sahiProxyHomePath, String tempLogCache); static String setTestSuiteBrowserContextVariable(String testSuiteBrowserName, String tempLogCache);  }