@Test public void allRobotSessionServerFilesAreCreated() throws Exception { final Set<File> createdSessionServerFiles = RedTemporaryDirectory.copySessionServerFiles(); final Set<String> sessionServerFileNames = Arrays.stream(getResourceFiles("/scripts")) .filter(RedTemporaryDirectoryTest::isRobotSessionServerFile) .map(File::getName) .collect(Collectors.toSet()); assertThat(createdSessionServerFiles).extracting(f -> f.getName()) .containsExactlyInAnyOrderElementsOf(sessionServerFileNames); }
@VisibleForTesting static Set<File> copySessionServerFiles() throws IOException { final Set<File> files = new HashSet<>(); for (final String filename : Arrays.asList(ROBOT_SESSION_SERVER, TEST_RUNNER_AGENT, CLASS_PATH_UPDATER, "classpath_updater.py", "red_keyword_autodiscover.py", "red_libraries.py", "red_library_autodiscover.py", "red_module_classes.py", "red_modules.py", "red_variables.py", "rflint_integration.py", "SuiteVisitorImportProxy.py")) { files.add(RedTemporaryDirectory.copyScriptFile(filename)); } return files; }
RedTemporaryDirectory { @VisibleForTesting static Set<File> copySessionServerFiles() throws IOException { final Set<File> files = new HashSet<>(); for (final String filename : Arrays.asList(ROBOT_SESSION_SERVER, TEST_RUNNER_AGENT, CLASS_PATH_UPDATER, "classpath_updater.py", "red_keyword_autodiscover.py", "red_libraries.py", "red_library_autodiscover.py", "red_module_classes.py", "red_modules.py", "red_variables.py", "rflint_integration.py", "SuiteVisitorImportProxy.py")) { files.add(RedTemporaryDirectory.copyScriptFile(filename)); } return files; } }
RedTemporaryDirectory { @VisibleForTesting static Set<File> copySessionServerFiles() throws IOException { final Set<File> files = new HashSet<>(); for (final String filename : Arrays.asList(ROBOT_SESSION_SERVER, TEST_RUNNER_AGENT, CLASS_PATH_UPDATER, "classpath_updater.py", "red_keyword_autodiscover.py", "red_libraries.py", "red_library_autodiscover.py", "red_module_classes.py", "red_modules.py", "red_variables.py", "rflint_integration.py", "SuiteVisitorImportProxy.py")) { files.add(RedTemporaryDirectory.copyScriptFile(filename)); } return files; }  }
RedTemporaryDirectory { @VisibleForTesting static Set<File> copySessionServerFiles() throws IOException { final Set<File> files = new HashSet<>(); for (final String filename : Arrays.asList(ROBOT_SESSION_SERVER, TEST_RUNNER_AGENT, CLASS_PATH_UPDATER, "classpath_updater.py", "red_keyword_autodiscover.py", "red_libraries.py", "red_library_autodiscover.py", "red_module_classes.py", "red_modules.py", "red_variables.py", "rflint_integration.py", "SuiteVisitorImportProxy.py")) { files.add(RedTemporaryDirectory.copyScriptFile(filename)); } return files; }  static File copyRedpydevdPackage(); static File getRedpydevdSetup(); static InputStream getRedpydevdInitAsStream(); static InputStream getRedpydevdFileAsStream(); static synchronized void createSessionServerFiles(); static synchronized Optional<File> getSessionServerFile(final String name); static File copyScriptFile(final String filename); static File copyScriptFile(final String dir, final String... filepath); static InputStream getScriptFileAsStream(final String filename); static InputStream getScriptFileAsStream(final String dir, final String... filepath); static File getTemporaryFile(final String filename); static File createTemporaryFile(final String filename); static synchronized Path createTemporaryDirectoryIfNotExists(); }
RedTemporaryDirectory { @VisibleForTesting static Set<File> copySessionServerFiles() throws IOException { final Set<File> files = new HashSet<>(); for (final String filename : Arrays.asList(ROBOT_SESSION_SERVER, TEST_RUNNER_AGENT, CLASS_PATH_UPDATER, "classpath_updater.py", "red_keyword_autodiscover.py", "red_libraries.py", "red_library_autodiscover.py", "red_module_classes.py", "red_modules.py", "red_variables.py", "rflint_integration.py", "SuiteVisitorImportProxy.py")) { files.add(RedTemporaryDirectory.copyScriptFile(filename)); } return files; }  static File copyRedpydevdPackage(); static File getRedpydevdSetup(); static InputStream getRedpydevdInitAsStream(); static InputStream getRedpydevdFileAsStream(); static synchronized void createSessionServerFiles(); static synchronized Optional<File> getSessionServerFile(final String name); static File copyScriptFile(final String filename); static File copyScriptFile(final String dir, final String... filepath); static InputStream getScriptFileAsStream(final String filename); static InputStream getScriptFileAsStream(final String dir, final String... filepath); static File getTemporaryFile(final String filename); static File createTemporaryFile(final String filename); static synchronized Path createTemporaryDirectoryIfNotExists(); static final String ROBOT_SESSION_SERVER; static final String TEST_RUNNER_AGENT; static final String CLASS_PATH_UPDATER; }