16 references to TestConfigurableResponse
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (16)
HandlerTests.cs (10)
159var response = Task.FromException<TestConfigurableResponse>(new InvalidOperationException(nameof(HandlerTests))); 163=> await server.ExecuteRequestAsync<TestRequestWithDocument, TestConfigurableResponse>(TestConfigurableDocumentHandler.MethodName, request, CancellationToken.None)); 187var response = Task.FromException<TestConfigurableResponse>(new StreamJsonRpc.LocalRpcException(nameof(HandlerTests)) { ErrorCode = LspErrorCodes.ContentModified }); 191=> await server.ExecuteRequestAsync<TestRequestWithDocument, TestConfigurableResponse>(TestConfigurableDocumentHandler.MethodName, request, CancellationToken.None)); 215var response = Task.FromException<TestConfigurableResponse>(new InvalidOperationException(nameof(HandlerTests))); 219=> await server.ExecuteRequestAsync<TestRequestWithDocument, TestConfigurableResponse>(TestConfigurableDocumentHandler.MethodName, request, CancellationToken.None)); 245var response = Task.FromException<TestConfigurableResponse>(new OperationCanceledException(nameof(HandlerTests))); 249=> await server.ExecuteRequestAsync<TestRequestWithDocument, TestConfigurableResponse>(TestConfigurableDocumentHandler.MethodName, request, CancellationToken.None)); 273var response = Task.FromException<TestConfigurableResponse>(new OperationCanceledException(nameof(HandlerTests))); 277=> 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);