use of org.eclipse.lsp4j.InitializedParams in project eclipse.jdt.ls by eclipse.
the class InitHandlerTest method testRegisterDelayedCapability.
@Test
public void testRegisterDelayedCapability() throws Exception {
ClientPreferences mockCapabilies = mock(ClientPreferences.class);
when(preferenceManager.getClientPreferences()).thenReturn(mockCapabilies);
when(mockCapabilies.isDocumentSymbolDynamicRegistered()).thenReturn(Boolean.TRUE);
when(mockCapabilies.isWorkspaceSymbolDynamicRegistered()).thenReturn(Boolean.TRUE);
when(mockCapabilies.isDocumentSymbolDynamicRegistered()).thenReturn(Boolean.TRUE);
when(mockCapabilies.isCodeActionDynamicRegistered()).thenReturn(Boolean.TRUE);
when(mockCapabilies.isDefinitionDynamicRegistered()).thenReturn(Boolean.TRUE);
when(mockCapabilies.isHoverDynamicRegistered()).thenReturn(Boolean.TRUE);
when(mockCapabilies.isReferencesDynamicRegistered()).thenReturn(Boolean.TRUE);
when(mockCapabilies.isDocumentHighlightDynamicRegistered()).thenReturn(Boolean.TRUE);
InitializeResult result = initialize(true);
assertNull(result.getCapabilities().getDocumentSymbolProvider());
server.initialized(new InitializedParams());
verify(client, times(7)).registerCapability(any());
}
Aggregations