public ObjectExplorerServiceTests() { connectionServiceMock = new Mock <ConnectionService>(); serviceHostMock = new Mock <IProtocolEndpoint>(); service = CreateOEService(connectionServiceMock.Object); service.InitializeService(serviceHostMock.Object); }
public ObjectExplorerServiceTests() { connectionServiceMock = new Mock <ConnectionService>(); serviceHostMock = new Mock <IProtocolEndpoint>(); service = CreateOEService(connectionServiceMock.Object); connectionServiceMock.Setup(x => x.RegisterConnectedQueue(It.IsAny <string>(), It.IsAny <IConnectedBindingQueue>())); service.InitializeService(serviceHostMock.Object); ConnectedBindingContext connectedBindingContext = new ConnectedBindingContext(); connectedBindingContext.ServerConnection = new ServerConnection(new SqlConnection(fakeConnectionString)); connectedBindingQueue = new ConnectedBindingQueue(false); connectedBindingQueue.BindingContextMap.Add($"{details.ServerName}_{details.DatabaseName}_{details.UserName}_NULL", connectedBindingContext); service.ConnectedBindingQueue = connectedBindingQueue; }