@Test public void testGetIncludFolderJsPath() throws Exception { Path pathMock = mock(Path.class); when(sakuliProperties.getJsLibFolder()).thenReturn(pathMock); when(pathMock.toAbsolutePath()).thenReturn(pathMock); if (File.separator.equals("/")) { when(pathMock.toString()).thenReturn("/sakuli/src/main/include"); String result = testling.getIncludeFolderJsPath(); Assert.assertEquals("/sakuli/src/main/include/sakuli.js", result); } else { when(pathMock.toString()).thenReturn("D:\\sakuli\\src\\main\\_include"); String result = testling.getIncludeFolderJsPath(); Assert.assertEquals("D:\\\\sakuli\\\\src\\\\main\\\\_include\\\\sakuli.js", result); } }
protected String getIncludeFolderJsPath() { String path = sakuliProperties.getJsLibFolder().toAbsolutePath().toString() + File.separator + "sakuli.js"; if (path.contains("\\")) { path = path.replaceAll("\\\\", "\\\\\\\\"); } return path; }
SahiConnector { protected String getIncludeFolderJsPath() { String path = sakuliProperties.getJsLibFolder().toAbsolutePath().toString() + File.separator + "sakuli.js"; if (path.contains("\\")) { path = path.replaceAll("\\\\", "\\\\\\\\"); } return path; } }
SahiConnector { protected String getIncludeFolderJsPath() { String path = sakuliProperties.getJsLibFolder().toAbsolutePath().toString() + File.separator + "sakuli.js"; if (path.contains("\\")) { path = path.replaceAll("\\\\", "\\\\\\\\"); } return path; }  }
SahiConnector { protected String getIncludeFolderJsPath() { String path = sakuliProperties.getJsLibFolder().toAbsolutePath().toString() + File.separator + "sakuli.js"; if (path.contains("\\")) { path = path.replaceAll("\\\\", "\\\\\\\\"); } return path; }  void init(); void startSahiTestSuite(); }
SahiConnector { protected String getIncludeFolderJsPath() { String path = sakuliProperties.getJsLibFolder().toAbsolutePath().toString() + File.separator + "sakuli.js"; if (path.contains("\\")) { path = path.replaceAll("\\\\", "\\\\\\\\"); } return path; }  void init(); void startSahiTestSuite();  }