@Test public void getTabpageTest() throws InterruptedException, ExecutionException { assertNormalBehavior( () -> CompletableFuture.completedFuture(new ResponseMessage(1, null, new MessagePackExtensionType((byte) NeovimCustomType.TABPAGE.getTypeId(), new byte[]{4}))), () -> windowStreamApi.getTabpage(), request -> assertMethodAndArguments(request, NeovimWindowApi.GET_TABPAGE, window), result -> assertEquals(4, result.get().getId()) ); assertErrorBehavior( () -> windowStreamApi.getTabpage(), request -> assertMethodAndArguments(request, NeovimWindowApi.GET_TABPAGE, window) ); }
@Override public CompletableFuture<NeovimTabpageApi> getTabpage() { return sendWithResponseOfMsgPackType(prepareMessage(GET_TABPAGE), Tabpage.class) .thenApply(tabpage -> new TabpageStreamApi(reactiveRpcStreamer, tabpage)); }
WindowStreamApi extends BaseStreamApi implements NeovimWindowApi { @Override public CompletableFuture<NeovimTabpageApi> getTabpage() { return sendWithResponseOfMsgPackType(prepareMessage(GET_TABPAGE), Tabpage.class) .thenApply(tabpage -> new TabpageStreamApi(reactiveRpcStreamer, tabpage)); } }
WindowStreamApi extends BaseStreamApi implements NeovimWindowApi { @Override public CompletableFuture<NeovimTabpageApi> getTabpage() { return sendWithResponseOfMsgPackType(prepareMessage(GET_TABPAGE), Tabpage.class) .thenApply(tabpage -> new TabpageStreamApi(reactiveRpcStreamer, tabpage)); } WindowStreamApi(ReactiveRpcStreamer reactiveRpcStreamer, Window model); }
WindowStreamApi extends BaseStreamApi implements NeovimWindowApi { @Override public CompletableFuture<NeovimTabpageApi> getTabpage() { return sendWithResponseOfMsgPackType(prepareMessage(GET_TABPAGE), Tabpage.class) .thenApply(tabpage -> new TabpageStreamApi(reactiveRpcStreamer, tabpage)); } WindowStreamApi(ReactiveRpcStreamer reactiveRpcStreamer, Window model); @Override Window get(); @Override CompletableFuture<NeovimBufferApi> getBuffer(); @Override CompletableFuture<Void> setBuffer(Buffer buffer); @Override CompletableFuture<VimCoords> getCursor(); @Override CompletableFuture<Void> setCursor(VimCoords vimCoords); @Override CompletableFuture<Integer> getHeight(); @Override CompletableFuture<Void> setHeight(int height); @Override CompletableFuture<Integer> getWidth(); @Override CompletableFuture<Void> setWidth(int width); @Override CompletableFuture<Object> getVar(String name); @Override CompletableFuture<Void> setVar(String name, Object value); @Override CompletableFuture<Void> deleteVar(String name); @Override CompletableFuture<Object> getOption(String name); @Override CompletableFuture<Void> setOption(String name, Object value); @Override CompletableFuture<Map<String, Object>> getConfig(); @Override CompletableFuture<Void> setConfig(Map<String, Object> config); @Override CompletableFuture<NeovimTabpageApi> getTabpage(); @Override CompletableFuture<Integer> getNumber(); @Override CompletableFuture<Boolean> isValid(); @Override CompletableFuture<Void> close(boolean force); @Override String toString(); }
WindowStreamApi extends BaseStreamApi implements NeovimWindowApi { @Override public CompletableFuture<NeovimTabpageApi> getTabpage() { return sendWithResponseOfMsgPackType(prepareMessage(GET_TABPAGE), Tabpage.class) .thenApply(tabpage -> new TabpageStreamApi(reactiveRpcStreamer, tabpage)); } WindowStreamApi(ReactiveRpcStreamer reactiveRpcStreamer, Window model); @Override Window get(); @Override CompletableFuture<NeovimBufferApi> getBuffer(); @Override CompletableFuture<Void> setBuffer(Buffer buffer); @Override CompletableFuture<VimCoords> getCursor(); @Override CompletableFuture<Void> setCursor(VimCoords vimCoords); @Override CompletableFuture<Integer> getHeight(); @Override CompletableFuture<Void> setHeight(int height); @Override CompletableFuture<Integer> getWidth(); @Override CompletableFuture<Void> setWidth(int width); @Override CompletableFuture<Object> getVar(String name); @Override CompletableFuture<Void> setVar(String name, Object value); @Override CompletableFuture<Void> deleteVar(String name); @Override CompletableFuture<Object> getOption(String name); @Override CompletableFuture<Void> setOption(String name, Object value); @Override CompletableFuture<Map<String, Object>> getConfig(); @Override CompletableFuture<Void> setConfig(Map<String, Object> config); @Override CompletableFuture<NeovimTabpageApi> getTabpage(); @Override CompletableFuture<Integer> getNumber(); @Override CompletableFuture<Boolean> isValid(); @Override CompletableFuture<Void> close(boolean force); @Override String toString();  }