@Test public void testCheckHomeFolder() throws Exception { Path path = Paths.get(BaseTest.SAKULI_HOME_FOLDER_PATH); assertTrue(Files.exists(path)); SakuliFolderHelper.checkSakuliHomeFolderAndSetContextVariables(path.toString(), ""); assertEquals(SakuliPropertyPlaceholderConfigurer.SAKULI_HOME_FOLDER_VALUE, path.toAbsolutePath().normalize().toString()); }
public static String checkSakuliHomeFolderAndSetContextVariables(String sakuliMainFolderPath, String tempLogCache) throws FileNotFoundException { Path normalizedPath = normalizePath(sakuliMainFolderPath); Path mainFolderPath = normalizedPath != null ? normalizedPath : getAlternativeSakuliMainFolder(); if (!Files.exists(mainFolderPath)) { throw new FileNotFoundException("SAKULI HOME folder \"" + mainFolderPath + "\" does not exist!"); } if (!checkSubMainFolder(mainFolderPath)) { throw new FileNotFoundException("the assigned SAKULI HOME folder \"" + mainFolderPath + "\" does not have a valid file structure! Please use the correct folder!"); } SakuliPropertyPlaceholderConfigurer.SAKULI_HOME_FOLDER_VALUE = mainFolderPath.normalize().toAbsolutePath().toString(); return tempLogCache + "\nset property '" + SakuliProperties.SAKULI_HOME_FOLDER + "' to \"" + SakuliPropertyPlaceholderConfigurer.SAKULI_HOME_FOLDER_VALUE + "\""; }
SakuliFolderHelper { public static String checkSakuliHomeFolderAndSetContextVariables(String sakuliMainFolderPath, String tempLogCache) throws FileNotFoundException { Path normalizedPath = normalizePath(sakuliMainFolderPath); Path mainFolderPath = normalizedPath != null ? normalizedPath : getAlternativeSakuliMainFolder(); if (!Files.exists(mainFolderPath)) { throw new FileNotFoundException("SAKULI HOME folder \"" + mainFolderPath + "\" does not exist!"); } if (!checkSubMainFolder(mainFolderPath)) { throw new FileNotFoundException("the assigned SAKULI HOME folder \"" + mainFolderPath + "\" does not have a valid file structure! Please use the correct folder!"); } SakuliPropertyPlaceholderConfigurer.SAKULI_HOME_FOLDER_VALUE = mainFolderPath.normalize().toAbsolutePath().toString(); return tempLogCache + "\nset property '" + SakuliProperties.SAKULI_HOME_FOLDER + "' to \"" + SakuliPropertyPlaceholderConfigurer.SAKULI_HOME_FOLDER_VALUE + "\""; } }
SakuliFolderHelper { public static String checkSakuliHomeFolderAndSetContextVariables(String sakuliMainFolderPath, String tempLogCache) throws FileNotFoundException { Path normalizedPath = normalizePath(sakuliMainFolderPath); Path mainFolderPath = normalizedPath != null ? normalizedPath : getAlternativeSakuliMainFolder(); if (!Files.exists(mainFolderPath)) { throw new FileNotFoundException("SAKULI HOME folder \"" + mainFolderPath + "\" does not exist!"); } if (!checkSubMainFolder(mainFolderPath)) { throw new FileNotFoundException("the assigned SAKULI HOME folder \"" + mainFolderPath + "\" does not have a valid file structure! Please use the correct folder!"); } SakuliPropertyPlaceholderConfigurer.SAKULI_HOME_FOLDER_VALUE = mainFolderPath.normalize().toAbsolutePath().toString(); return tempLogCache + "\nset property '" + SakuliProperties.SAKULI_HOME_FOLDER + "' to \"" + SakuliPropertyPlaceholderConfigurer.SAKULI_HOME_FOLDER_VALUE + "\""; }  }
SakuliFolderHelper { public static String checkSakuliHomeFolderAndSetContextVariables(String sakuliMainFolderPath, String tempLogCache) throws FileNotFoundException { Path normalizedPath = normalizePath(sakuliMainFolderPath); Path mainFolderPath = normalizedPath != null ? normalizedPath : getAlternativeSakuliMainFolder(); if (!Files.exists(mainFolderPath)) { throw new FileNotFoundException("SAKULI HOME folder \"" + mainFolderPath + "\" does not exist!"); } if (!checkSubMainFolder(mainFolderPath)) { throw new FileNotFoundException("the assigned SAKULI HOME folder \"" + mainFolderPath + "\" does not have a valid file structure! Please use the correct folder!"); } SakuliPropertyPlaceholderConfigurer.SAKULI_HOME_FOLDER_VALUE = mainFolderPath.normalize().toAbsolutePath().toString(); return tempLogCache + "\nset property '" + SakuliProperties.SAKULI_HOME_FOLDER + "' to \"" + SakuliPropertyPlaceholderConfigurer.SAKULI_HOME_FOLDER_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 checkSakuliHomeFolderAndSetContextVariables(String sakuliMainFolderPath, String tempLogCache) throws FileNotFoundException { Path normalizedPath = normalizePath(sakuliMainFolderPath); Path mainFolderPath = normalizedPath != null ? normalizedPath : getAlternativeSakuliMainFolder(); if (!Files.exists(mainFolderPath)) { throw new FileNotFoundException("SAKULI HOME folder \"" + mainFolderPath + "\" does not exist!"); } if (!checkSubMainFolder(mainFolderPath)) { throw new FileNotFoundException("the assigned SAKULI HOME folder \"" + mainFolderPath + "\" does not have a valid file structure! Please use the correct folder!"); } SakuliPropertyPlaceholderConfigurer.SAKULI_HOME_FOLDER_VALUE = mainFolderPath.normalize().toAbsolutePath().toString(); return tempLogCache + "\nset property '" + SakuliProperties.SAKULI_HOME_FOLDER + "' to \"" + SakuliPropertyPlaceholderConfigurer.SAKULI_HOME_FOLDER_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);  }