@Test @EnabledOnOs(OS.WINDOWS) public void modulesSearchPathsAreCanonicalized() { final RobotCommandExecutor executor = mock(RobotCommandExecutor.class); when(executor.getModulesSearchPaths()) .thenReturn(newArrayList(new File(tempDir, "module"), new File(tempDir, "module2"))); final RobotRuntimeEnvironment env = createEnvironment(executor); final List<File> modulesSearchPaths = env.getModuleSearchPaths(); assertThat(modulesSearchPaths).extracting(File::getName).containsOnly("MoDuLe", "module2"); }
@Override public List<File> getModuleSearchPaths() { final RobotCommandExecutor executor = executors.getRobotCommandExecutor(location); return executor.getModulesSearchPaths().stream().map(this::tryToCanonical).collect(toList()); }
RobotRuntimeEnvironment implements IRuntimeEnvironment { @Override public List<File> getModuleSearchPaths() { final RobotCommandExecutor executor = executors.getRobotCommandExecutor(location); return executor.getModulesSearchPaths().stream().map(this::tryToCanonical).collect(toList()); } }
RobotRuntimeEnvironment implements IRuntimeEnvironment { @Override public List<File> getModuleSearchPaths() { final RobotCommandExecutor executor = executors.getRobotCommandExecutor(location); return executor.getModulesSearchPaths().stream().map(this::tryToCanonical).collect(toList()); } RobotRuntimeEnvironment(final PythonInstallationDirectory location, final String version); @VisibleForTesting  RobotRuntimeEnvironment(final RobotCommandsExecutors executors, final PythonInstallationDirectory location,
            final String version); }
RobotRuntimeEnvironment implements IRuntimeEnvironment { @Override public List<File> getModuleSearchPaths() { final RobotCommandExecutor executor = executors.getRobotCommandExecutor(location); return executor.getModulesSearchPaths().stream().map(this::tryToCanonical).collect(toList()); } RobotRuntimeEnvironment(final PythonInstallationDirectory location, final String version); @VisibleForTesting  RobotRuntimeEnvironment(final RobotCommandsExecutors executors, final PythonInstallationDirectory location,
            final String version); static void addProcessListener(final PythonProcessListener listener); static void removeProcessListener(final PythonProcessListener listener); @Override boolean isNullEnvironment(); @Override boolean isValidPythonInstallation(); @Override boolean hasRobotInstalled(); @Override String getVersion(); @Override RobotVersion getRobotVersion(); @Override SuiteExecutor getInterpreter(); @Override PythonInstallationDirectory getFile(); @Override void resetCommandExecutors(); @Override List<File> getModuleSearchPaths(); @Override Optional<File> getModulePath(final String moduleName, final EnvironmentSearchPaths additionalPaths); @Override void createLibdoc(final String libName, final File outputFile, final LibdocFormat format,
            final EnvironmentSearchPaths additionalPaths); @Override void createLibdocInSeparateProcess(final String libName, final File outputFile, final LibdocFormat format,
            final EnvironmentSearchPaths additionalPaths, final int timeout); @Override String createHtmlDoc(final String doc, final DocFormat format); @Override List<String> getStandardLibrariesNames(); @Override Optional<File> getStandardLibraryPath(final String libraryName); @Override SitePackagesLibraries getSitePackagesLibrariesNames(); @Override List<String> getClassesFromModule(final File moduleLocation, final EnvironmentSearchPaths additionalPaths); @Override Map<String, Object> getGlobalVariables(); @Override Map<String, Object> getVariablesFromFile(final File source, final List<String> arguments,
            final EnvironmentSearchPaths additionalPaths); @Override List<RfLintRule> getRfLintRules(final List<String> rulesFiles); @Override void runRfLint(final String host, final int port, final File projectLocation,
            final List<String> excludedPaths, final File filepath, final List<RfLintRule> rules,
            final List<String> rulesFiles, final List<String> additionalArguments); @Override String convertRobotDataFile(final File originalFile); @Override void startLibraryAutoDiscovering(final int port, final File dataSource, final File projectLocation,
            final boolean supportGevent, final boolean recursiveInVirtualenv, final List<String> excludedPaths,
            final EnvironmentSearchPaths additionalPaths); @Override void startKeywordAutoDiscovering(final int port, final File dataSource, final boolean supportGevent,
            final EnvironmentSearchPaths additionalPaths); @Override void stopAutoDiscovering(); @Override int hashCode(); @Override boolean equals(final Object obj); }
RobotRuntimeEnvironment implements IRuntimeEnvironment { @Override public List<File> getModuleSearchPaths() { final RobotCommandExecutor executor = executors.getRobotCommandExecutor(location); return executor.getModulesSearchPaths().stream().map(this::tryToCanonical).collect(toList()); } RobotRuntimeEnvironment(final PythonInstallationDirectory location, final String version); @VisibleForTesting  RobotRuntimeEnvironment(final RobotCommandsExecutors executors, final PythonInstallationDirectory location,
            final String version); static void addProcessListener(final PythonProcessListener listener); static void removeProcessListener(final PythonProcessListener listener); @Override boolean isNullEnvironment(); @Override boolean isValidPythonInstallation(); @Override boolean hasRobotInstalled(); @Override String getVersion(); @Override RobotVersion getRobotVersion(); @Override SuiteExecutor getInterpreter(); @Override PythonInstallationDirectory getFile(); @Override void resetCommandExecutors(); @Override List<File> getModuleSearchPaths(); @Override Optional<File> getModulePath(final String moduleName, final EnvironmentSearchPaths additionalPaths); @Override void createLibdoc(final String libName, final File outputFile, final LibdocFormat format,
            final EnvironmentSearchPaths additionalPaths); @Override void createLibdocInSeparateProcess(final String libName, final File outputFile, final LibdocFormat format,
            final EnvironmentSearchPaths additionalPaths, final int timeout); @Override String createHtmlDoc(final String doc, final DocFormat format); @Override List<String> getStandardLibrariesNames(); @Override Optional<File> getStandardLibraryPath(final String libraryName); @Override SitePackagesLibraries getSitePackagesLibrariesNames(); @Override List<String> getClassesFromModule(final File moduleLocation, final EnvironmentSearchPaths additionalPaths); @Override Map<String, Object> getGlobalVariables(); @Override Map<String, Object> getVariablesFromFile(final File source, final List<String> arguments,
            final EnvironmentSearchPaths additionalPaths); @Override List<RfLintRule> getRfLintRules(final List<String> rulesFiles); @Override void runRfLint(final String host, final int port, final File projectLocation,
            final List<String> excludedPaths, final File filepath, final List<RfLintRule> rules,
            final List<String> rulesFiles, final List<String> additionalArguments); @Override String convertRobotDataFile(final File originalFile); @Override void startLibraryAutoDiscovering(final int port, final File dataSource, final File projectLocation,
            final boolean supportGevent, final boolean recursiveInVirtualenv, final List<String> excludedPaths,
            final EnvironmentSearchPaths additionalPaths); @Override void startKeywordAutoDiscovering(final int port, final File dataSource, final boolean supportGevent,
            final EnvironmentSearchPaths additionalPaths); @Override void stopAutoDiscovering(); @Override int hashCode(); @Override boolean equals(final Object obj);  }