mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-29 17:24:34 -05:00
Kusto AdminService Unit Tests (#1257)
* Added unit tests for AdminService. Added interface for IConnectionService. * Kusto connection map to ConnectionManager (#1258) * Created ConnectionManager and moved connectionMap. Changed references from ConnectionService to ConnectionManager. * Changed creation of ConnectionManager to MEF instead of Instance creation
This commit is contained in:
@@ -47,6 +47,8 @@ namespace Microsoft.Kusto.ServiceLayer.ObjectExplorer
|
||||
/// </summary>
|
||||
private ObjectExplorerSettings _settings;
|
||||
|
||||
private IConnectionManager _connectionManager;
|
||||
|
||||
/// <summary>
|
||||
/// Singleton constructor
|
||||
/// </summary>
|
||||
@@ -78,6 +80,7 @@ namespace Microsoft.Kusto.ServiceLayer.ObjectExplorer
|
||||
Validate.IsNotNull(nameof(provider), provider);
|
||||
_serviceProvider = provider;
|
||||
_connectionService = provider.GetService<ConnectionService>();
|
||||
_connectionManager = provider.GetService<IConnectionManager>();
|
||||
|
||||
try
|
||||
{
|
||||
@@ -425,7 +428,7 @@ namespace Microsoft.Kusto.ServiceLayer.ObjectExplorer
|
||||
|
||||
ConnectionInfo connectionInfo;
|
||||
ConnectionCompleteParams connectionResult = await Connect(connectParams, uri);
|
||||
if (!_connectionService.TryFindConnection(uri, out connectionInfo))
|
||||
if (!_connectionManager.TryGetValue(uri, out connectionInfo))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user