16 references to TestConfigurableResponse
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (16)
HandlerTests.cs (10)
161var response = Task.FromException<TestConfigurableResponse>(new InvalidOperationException(nameof(HandlerTests))); 165=> await server.ExecuteRequestAsync<TestRequestWithDocument, TestConfigurableResponse>(TestConfigurableDocumentHandler.MethodName, request, CancellationToken.None)); 194var response = Task.FromException<TestConfigurableResponse>(new StreamJsonRpc.LocalRpcException(nameof(HandlerTests)) { ErrorCode = LspErrorCodes.ContentModified }); 198=> await server.ExecuteRequestAsync<TestRequestWithDocument, TestConfigurableResponse>(TestConfigurableDocumentHandler.MethodName, request, CancellationToken.None)); 227var response = Task.FromException<TestConfigurableResponse>(new InvalidOperationException(nameof(HandlerTests))); 231=> await server.ExecuteRequestAsync<TestRequestWithDocument, TestConfigurableResponse>(TestConfigurableDocumentHandler.MethodName, request, CancellationToken.None)); 257var response = Task.FromException<TestConfigurableResponse>(new OperationCanceledException(nameof(HandlerTests))); 261=> await server.ExecuteRequestAsync<TestRequestWithDocument, TestConfigurableResponse>(TestConfigurableDocumentHandler.MethodName, request, CancellationToken.None)); 290var response = Task.FromException<TestConfigurableResponse>(new OperationCanceledException(nameof(HandlerTests))); 294=> await server.ExecuteRequestAsync<TestRequestWithDocument, TestConfigurableResponse>(TestConfigurableDocumentHandler.MethodName, request, CancellationToken.None));
TestConfigurableDocumentHandler.cs (6)
27internal sealed class TestConfigurableDocumentHandler() : ILspServiceDocumentRequestHandler<TestRequestWithDocument, TestConfigurableResponse> 33private Task<TestConfigurableResponse>? _response; 38public void ConfigureHandler(bool mutatesSolutionState, bool requiresLspSolution, Task<TestConfigurableResponse> response) 55public Task<TestConfigurableResponse> HandleRequestAsync(TestRequestWithDocument request, RequestContext context, CancellationToken cancellationToken) 61public static void ConfigureHandler(TestLspServer server, bool mutatesSolutionState, bool requiresLspSolution, Task<TestConfigurableResponse> response) 64TypeRef.From(typeof(TestRequestWithDocument)), TypeRef.From(typeof(TestConfigurableResponse)), LanguageServerConstants.DefaultLanguageName);