private ClientNotifierServiceBase GetLanguageServer(IResponseRouterReturns result, bool shouldThrow = false) { var languageServer = new Mock <ClientNotifierServiceBase>(MockBehavior.Strict); if (shouldThrow) { } else { languageServer .Setup(l => l.SendRequestAsync("workspace/configuration", It.IsAny <ConfigurationParams>())) .Returns(Task.FromResult(result)); } return(languageServer.Object); }
private IClientLanguageServer GetLanguageServer(IResponseRouterReturns result, bool shouldThrow = false) { var languageServer = new Mock <IClientLanguageServer>(MockBehavior.Strict); if (shouldThrow) { } else { languageServer .Setup(l => l.SendRequest("workspace/configuration", It.IsAny <ConfigurationParams>())) .Returns(result); } return(languageServer.Object); }