@Test public void test_mac_default_executable_not_found() throws IOException { when(mockProcessWrapper.isMac()).thenReturn(true); thrown.expect(NodeCommandException.class); thrown.expectMessage("Default Node.js executable for MacOS does not exist."); NodeCommand.builder(mockProcessWrapper) .pathResolver(p -> "/file/does/not/exist") .build(); }
public static NodeCommandBuilder builder() { return builder(new ProcessWrapperImpl()); }
NodeCommand { public static NodeCommandBuilder builder() { return builder(new ProcessWrapperImpl()); } }
NodeCommand { public static NodeCommandBuilder builder() { return builder(new ProcessWrapperImpl()); } NodeCommand(ProcessWrapper processWrapper, String nodeExecutable, int actualNodeVersion, List<String> nodeJsArgs, @Nullable String scriptFilename,
    List<String> args,
    Consumer<String> outputConsumer,
    Consumer<String> errorConsumer); }
NodeCommand { public static NodeCommandBuilder builder() { return builder(new ProcessWrapperImpl()); } NodeCommand(ProcessWrapper processWrapper, String nodeExecutable, int actualNodeVersion, List<String> nodeJsArgs, @Nullable String scriptFilename,
    List<String> args,
    Consumer<String> outputConsumer,
    Consumer<String> errorConsumer); void start(); int waitFor(); @Override String toString(); int getActualNodeVersion(); static NodeCommandBuilder builder(); }
NodeCommand { public static NodeCommandBuilder builder() { return builder(new ProcessWrapperImpl()); } NodeCommand(ProcessWrapper processWrapper, String nodeExecutable, int actualNodeVersion, List<String> nodeJsArgs, @Nullable String scriptFilename,
    List<String> args,
    Consumer<String> outputConsumer,
    Consumer<String> errorConsumer); void start(); int waitFor(); @Override String toString(); int getActualNodeVersion(); static NodeCommandBuilder builder();  }