@Test public void delegatesInput() { given(neovimApi.input("keys")).willReturn(CompletableFuture.completedFuture(5)); neovimRxWrapper.input("keys") .test() .assertNoErrors() .assertComplete() .assertValue(5); verify(neovimApi).input("keys"); }
@Override public Single<Integer> input(String keys) { return Single.fromFuture(neovimApi.input(keys)); }
NeovimRxWrapper implements NeovimRxApi { @Override public Single<Integer> input(String keys) { return Single.fromFuture(neovimApi.input(keys)); } }
NeovimRxWrapper implements NeovimRxApi { @Override public Single<Integer> input(String keys) { return Single.fromFuture(neovimApi.input(keys)); } NeovimRxWrapper(NeovimApi neovimApi); }
NeovimRxWrapper implements NeovimRxApi { @Override public Single<Integer> input(String keys) { return Single.fromFuture(neovimApi.input(keys)); } NeovimRxWrapper(NeovimApi neovimApi); @Override Single<List> sendAtomic(AtomicCallBuilder atomicCallBuilder); @Override AtomicCallBuilder prepareAtomic(); @Override Single<Map> getHighlightById(int id, boolean rgb); @Override Single<Map> getHighlightByName(String name, boolean rgb); @Override Completable attachUi(int width, int height, UiOptions options); @Override Completable detachUi(); @Override Completable resizeUi(int width, int height); @Override Completable resizeUiGrid(int width, int height); @Override Completable setPopupmenuHeight(int height); @Override Completable inputMouse(Mouse.Button button, Mouse.Action action, String modifier, int grid, int row, int col); @Override Single<Object> executeLua(String luaCode, List<String> args); @Override Completable executeCommand(String command); @Override Completable setCurrentDir(String directoryPath); @Override Completable subscribeToEvent(String event); @Override Completable unsubscribeFromEvent(String event); @Override Single<Object> eval(String expression); @Override Single<Object> callFunction(String name, List<Object> args); @Override Completable feedKeys(String keys, String mode, Boolean escape); @Override Single<Integer> input(String keys); @Override Single<List<VimKeyMap>> getKeymap(String mode); @Override Completable setKeymap(String mode, String lhs, String rhs, Map<String, Boolean> options); @Override Completable deleteKeymap(String mode, String lhs); @Override Completable setUiOption(String name, Object value); @Override Completable setVariable(String name, Object value); @Override Single<Object> getVariable(String name); @Override Completable deleteVariable(String name); @Override Single<Object> getVimVariable(String name); @Override Completable setVimVariable(String name, Object value); @Override Completable setOption(String name, Object value); @Override Single<Object> getOption(String name); @Override Single<Integer> getColorByName(String name); @Override Single<String> replaceTermcodes(String strToReplace, boolean fromPart, boolean doLt, boolean special); @Override Single<String> commandOutput(String command); @Override Completable writeToOutput(String text); @Override Completable writeToError(String text); @Override Completable writelnToError(String text); @Override Single<Integer> stringWidth(String string); @Override Single<List<String>> listRuntimePaths(); @Override Single<String> getCurrentLine(); @Override Completable setCurrentLine(String line); @Override Completable deleteCurrentLine(); @Override Single<List<NeovimBufferRxApi>> getBuffers(); @Override Single<NeovimBufferRxApi> createBuffer(boolean listed, boolean scratch); @Override Single<NeovimBufferRxApi> getCurrentBuffer(); @Override Completable setCurrentBuffer(Buffer buffer); @Override Single<List<NeovimWindowRxApi>> getWindows(); @Override Single<NeovimWindowRxApi> openWindow(Buffer buffer, boolean enter, Map<String, Object> config); @Override Single<NeovimWindowRxApi> getCurrentWindow(); @Override Completable setCurrentWindow(Window window); @Override Single<List<NeovimTabpageRxApi>> getTabpages(); @Override Single<NeovimTabpageRxApi> getCurrentTabpage(); @Override Completable setCurrentTabpage(Tabpage tabpage); @Override Single<VimColorMap> getColorMap(); @Override Single<VimMode> getMode(); @Override Single<ApiInfo> getApiInfo(); @Override Single<Object> callDictFunction(Map map, String function, List args); @Override Single<Map<String, CommandInfo>> getCommands(GetCommandsOptions getCommandsOptions); @Override Completable setClientInfo(String name, ClientVersionInfo clientVersionInfo, ClientType clientType, Map<String, MethodInfo> methods, ClientAttributes clientAttributes); @Override Single<ChannelInfo> getChannelInfo(int channel); @Override Single<List<ChannelInfo>> getChannels(); @Override Single<Map> parseExpression(String expression, String flags, boolean highlight); @Override Single<List<UiInfo>> getUis(); @Override Single<List<Integer>> getProcessChildren(); @Override Single<Object> getProcess(); @Override Single<Map<String, Integer>> getNamespaces(); @Override Single<Integer> createNamespace(String name); @Override Single<Boolean> paste(String data, boolean crlf, int phase); @Override Completable put(List<String> lines, String type, boolean after, boolean follow); @Override Single<Map<String, Object>> getContext(Map<String, Object> options); @Override Completable loadContext(Map<String, Object> contextMap); @Override Completable selectPopupmenuItem(int item, boolean insert, boolean finish, Map<String, Object> options); }
NeovimRxWrapper implements NeovimRxApi { @Override public Single<Integer> input(String keys) { return Single.fromFuture(neovimApi.input(keys)); } NeovimRxWrapper(NeovimApi neovimApi); @Override Single<List> sendAtomic(AtomicCallBuilder atomicCallBuilder); @Override AtomicCallBuilder prepareAtomic(); @Override Single<Map> getHighlightById(int id, boolean rgb); @Override Single<Map> getHighlightByName(String name, boolean rgb); @Override Completable attachUi(int width, int height, UiOptions options); @Override Completable detachUi(); @Override Completable resizeUi(int width, int height); @Override Completable resizeUiGrid(int width, int height); @Override Completable setPopupmenuHeight(int height); @Override Completable inputMouse(Mouse.Button button, Mouse.Action action, String modifier, int grid, int row, int col); @Override Single<Object> executeLua(String luaCode, List<String> args); @Override Completable executeCommand(String command); @Override Completable setCurrentDir(String directoryPath); @Override Completable subscribeToEvent(String event); @Override Completable unsubscribeFromEvent(String event); @Override Single<Object> eval(String expression); @Override Single<Object> callFunction(String name, List<Object> args); @Override Completable feedKeys(String keys, String mode, Boolean escape); @Override Single<Integer> input(String keys); @Override Single<List<VimKeyMap>> getKeymap(String mode); @Override Completable setKeymap(String mode, String lhs, String rhs, Map<String, Boolean> options); @Override Completable deleteKeymap(String mode, String lhs); @Override Completable setUiOption(String name, Object value); @Override Completable setVariable(String name, Object value); @Override Single<Object> getVariable(String name); @Override Completable deleteVariable(String name); @Override Single<Object> getVimVariable(String name); @Override Completable setVimVariable(String name, Object value); @Override Completable setOption(String name, Object value); @Override Single<Object> getOption(String name); @Override Single<Integer> getColorByName(String name); @Override Single<String> replaceTermcodes(String strToReplace, boolean fromPart, boolean doLt, boolean special); @Override Single<String> commandOutput(String command); @Override Completable writeToOutput(String text); @Override Completable writeToError(String text); @Override Completable writelnToError(String text); @Override Single<Integer> stringWidth(String string); @Override Single<List<String>> listRuntimePaths(); @Override Single<String> getCurrentLine(); @Override Completable setCurrentLine(String line); @Override Completable deleteCurrentLine(); @Override Single<List<NeovimBufferRxApi>> getBuffers(); @Override Single<NeovimBufferRxApi> createBuffer(boolean listed, boolean scratch); @Override Single<NeovimBufferRxApi> getCurrentBuffer(); @Override Completable setCurrentBuffer(Buffer buffer); @Override Single<List<NeovimWindowRxApi>> getWindows(); @Override Single<NeovimWindowRxApi> openWindow(Buffer buffer, boolean enter, Map<String, Object> config); @Override Single<NeovimWindowRxApi> getCurrentWindow(); @Override Completable setCurrentWindow(Window window); @Override Single<List<NeovimTabpageRxApi>> getTabpages(); @Override Single<NeovimTabpageRxApi> getCurrentTabpage(); @Override Completable setCurrentTabpage(Tabpage tabpage); @Override Single<VimColorMap> getColorMap(); @Override Single<VimMode> getMode(); @Override Single<ApiInfo> getApiInfo(); @Override Single<Object> callDictFunction(Map map, String function, List args); @Override Single<Map<String, CommandInfo>> getCommands(GetCommandsOptions getCommandsOptions); @Override Completable setClientInfo(String name, ClientVersionInfo clientVersionInfo, ClientType clientType, Map<String, MethodInfo> methods, ClientAttributes clientAttributes); @Override Single<ChannelInfo> getChannelInfo(int channel); @Override Single<List<ChannelInfo>> getChannels(); @Override Single<Map> parseExpression(String expression, String flags, boolean highlight); @Override Single<List<UiInfo>> getUis(); @Override Single<List<Integer>> getProcessChildren(); @Override Single<Object> getProcess(); @Override Single<Map<String, Integer>> getNamespaces(); @Override Single<Integer> createNamespace(String name); @Override Single<Boolean> paste(String data, boolean crlf, int phase); @Override Completable put(List<String> lines, String type, boolean after, boolean follow); @Override Single<Map<String, Object>> getContext(Map<String, Object> options); @Override Completable loadContext(Map<String, Object> contextMap); @Override Completable selectPopupmenuItem(int item, boolean insert, boolean finish, Map<String, Object> options);  }