@Test public void getVarTest() throws ExecutionException, InterruptedException { var varVal = "value"; assertNormalBehavior( () -> CompletableFuture.completedFuture(new ResponseMessage(1, null, varVal)), () -> tabpageStreamApi.getVar("name"), request -> assertMethodAndArguments(request, NeovimTabpageApi.GET_VAR, tabpage, "name"), result -> assertEquals(varVal, result) ); assertErrorBehavior( () -> tabpageStreamApi.getVar("wrong name"), request -> assertMethodAndArguments(request, NeovimTabpageApi.GET_VAR, tabpage, "wrong name") ); }
@Override public CompletableFuture<Object> getVar(String name) { return sendWithGenericResponse(prepareMessage(GET_VAR).addArgument(name)); }
TabpageStreamApi extends BaseStreamApi implements NeovimTabpageApi { @Override public CompletableFuture<Object> getVar(String name) { return sendWithGenericResponse(prepareMessage(GET_VAR).addArgument(name)); } }
TabpageStreamApi extends BaseStreamApi implements NeovimTabpageApi { @Override public CompletableFuture<Object> getVar(String name) { return sendWithGenericResponse(prepareMessage(GET_VAR).addArgument(name)); } TabpageStreamApi(ReactiveRpcStreamer reactiveRpcStreamer, Tabpage model); }
TabpageStreamApi extends BaseStreamApi implements NeovimTabpageApi { @Override public CompletableFuture<Object> getVar(String name) { return sendWithGenericResponse(prepareMessage(GET_VAR).addArgument(name)); } 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<Object> getVar(String name) { return sendWithGenericResponse(prepareMessage(GET_VAR).addArgument(name)); } 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();  }