@Test public void setVarTest() throws ExecutionException, InterruptedException { var varVal = "value"; assertNormalBehavior( () -> CompletableFuture.completedFuture(new ResponseMessage(1, null, null)), () -> tabpageStreamApi.setVar("name", varVal), request -> assertMethodAndArguments(request, NeovimTabpageApi.SET_VAR, tabpage, "name", varVal) ); var badVal = new Object(); assertErrorBehavior( () -> tabpageStreamApi.setVar("wrong name", badVal), request -> assertMethodAndArguments(request, NeovimTabpageApi.SET_VAR, tabpage, "wrong name", badVal) ); }
@Override public CompletableFuture<Void> setVar(String name, Object value) { return sendWithNoResponse(prepareMessage(SET_VAR).addArgument(name).addArgument(value)); }
TabpageStreamApi extends BaseStreamApi implements NeovimTabpageApi { @Override public CompletableFuture<Void> setVar(String name, Object value) { return sendWithNoResponse(prepareMessage(SET_VAR).addArgument(name).addArgument(value)); } }
TabpageStreamApi extends BaseStreamApi implements NeovimTabpageApi { @Override public CompletableFuture<Void> setVar(String name, Object value) { return sendWithNoResponse(prepareMessage(SET_VAR).addArgument(name).addArgument(value)); } TabpageStreamApi(ReactiveRpcStreamer reactiveRpcStreamer, Tabpage model); }
TabpageStreamApi extends BaseStreamApi implements NeovimTabpageApi { @Override public CompletableFuture<Void> setVar(String name, Object value) { return sendWithNoResponse(prepareMessage(SET_VAR).addArgument(name).addArgument(value)); } TabpageStreamApi(ReactiveRpcStreamer reactiveRpcStreamer, Tabpage model); @Override Tabpage get(); @Override CompletableFuture<List<NeovimWindowApi>> getWindows(); @Override CompletableFuture<NeovimWindowApi> getWindow(); @Override CompletableFuture<Object> getVar(String name); @Override CompletableFuture<Void> setVar(String name, Object value); @Override CompletableFuture<Void> deleteVar(String name); @Override CompletableFuture<Integer> getNumber(); @Override CompletableFuture<Boolean> isValid(); @Override String toString(); }
TabpageStreamApi extends BaseStreamApi implements NeovimTabpageApi { @Override public CompletableFuture<Void> setVar(String name, Object value) { return sendWithNoResponse(prepareMessage(SET_VAR).addArgument(name).addArgument(value)); } TabpageStreamApi(ReactiveRpcStreamer reactiveRpcStreamer, Tabpage model); @Override Tabpage get(); @Override CompletableFuture<List<NeovimWindowApi>> getWindows(); @Override CompletableFuture<NeovimWindowApi> getWindow(); @Override CompletableFuture<Object> getVar(String name); @Override CompletableFuture<Void> setVar(String name, Object value); @Override CompletableFuture<Void> deleteVar(String name); @Override CompletableFuture<Integer> getNumber(); @Override CompletableFuture<Boolean> isValid(); @Override String toString();  }