public void SetUp()
        {
            _client1 = MockRepository.GenerateStub<IMembaseManagementClient>();
            _client2 = MockRepository.GenerateStub<IMembaseManagementClient>();

            _clientPool = new ManagementClientPool(new[] { _client1, _client2 });
            _pooledClient = new PooledManagementClient(_clientPool);
        }
 public void CreateManagementClientPool(int numClients)
 {
     _clients = new List<IMembaseManagementClient>();
     for (int i = 0; i < numClients; i++)
     {
         _clients.Add(MockRepository.GenerateStub<IMembaseManagementClient>());
     }
     _pool = new ManagementClientPool(_clients);
 }
        private static IMembaseManagementClient CreatePooledClient(
            IEnumerable<Uri> managementEndpoints,
            string adminUserName,
            string adminPassword)
        {
            var clientPool = new ManagementClientPool(managementEndpoints.Select(
                endpoint => CreateNonPooledClient(endpoint, adminUserName, adminPassword)));

            return new PooledManagementClient(clientPool);
        }