16 references to TestConfigurableResponse
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (16)
HandlerTests.cs (10)
156var response = Task.FromException<TestConfigurableResponse>(new InvalidOperationException(nameof(HandlerTests))); 160=> await server.ExecuteRequestAsync<TestRequestWithDocument, TestConfigurableResponse>(TestConfigurableDocumentHandler.MethodName, request, CancellationToken.None)); 184var response = Task.FromException<TestConfigurableResponse>(new StreamJsonRpc.LocalRpcException(nameof(HandlerTests)) { ErrorCode = LspErrorCodes.ContentModified }); 188=> await server.ExecuteRequestAsync<TestRequestWithDocument, TestConfigurableResponse>(TestConfigurableDocumentHandler.MethodName, request, CancellationToken.None)); 212var response = Task.FromException<TestConfigurableResponse>(new InvalidOperationException(nameof(HandlerTests))); 216=> await server.ExecuteRequestAsync<TestRequestWithDocument, TestConfigurableResponse>(TestConfigurableDocumentHandler.MethodName, request, CancellationToken.None)); 242var response = Task.FromException<TestConfigurableResponse>(new OperationCanceledException(nameof(HandlerTests))); 246=> await server.ExecuteRequestAsync<TestRequestWithDocument, TestConfigurableResponse>(TestConfigurableDocumentHandler.MethodName, request, CancellationToken.None)); 270var response = Task.FromException<TestConfigurableResponse>(new OperationCanceledException(nameof(HandlerTests))); 274=> await server.ExecuteRequestAsync<TestRequestWithDocument, TestConfigurableResponse>(TestConfigurableDocumentHandler.MethodName, request, CancellationToken.None));
TestConfigurableDocumentHandler.cs (6)
26internal sealed class TestConfigurableDocumentHandler() : ILspServiceDocumentRequestHandler<TestRequestWithDocument, TestConfigurableResponse> 32private Task<TestConfigurableResponse>? _response; 37public void ConfigureHandler(bool mutatesSolutionState, bool requiresLspSolution, Task<TestConfigurableResponse> response) 54public Task<TestConfigurableResponse> HandleRequestAsync(TestRequestWithDocument request, RequestContext context, CancellationToken cancellationToken) 60public static void ConfigureHandler(TestLspServer server, bool mutatesSolutionState, bool requiresLspSolution, Task<TestConfigurableResponse> response) 63TypeRef.From(typeof(TestRequestWithDocument)), TypeRef.From(typeof(TestConfigurableResponse)), LanguageServerConstants.DefaultLanguageName);