/// <summary>
        /// Gets the configuration for a config section. The hostname and port will be pulled from the appsettings.
        /// </summary>
        /// <param name="sectionName"></param>
        /// <returns></returns>
        /// <exception cref="ConfigurationErrorsException">A configuration file could not be loaded.</exception>
        public static ClientConfiguration GetConfiguration(string sectionName)
        {
            EnsureConfigurationLoaded();

            var definition = new CouchbaseClientDefinition();
            _jsonConfiguration.GetSection("couchbase:" + sectionName).Bind(definition);

            var configuration = new ClientConfiguration(definition)
            {
                Servers = new List<Uri>
                {
                    BuildBootStrapUrl()
                }
            };

            return configuration;
        }
        public void POCO_NoServers_DefaultsToLocalhost()
        {
            // Arrange

            var clientDefinition = new CouchbaseClientDefinition()
            {
                Servers = null
            };

            // Act

            var clientConfig = new ClientConfiguration(clientDefinition);

            // Assert

            Assert.AreEqual(1, clientConfig.Servers.Count);
            Assert.AreEqual(ClientConfiguration.Defaults.Server, clientConfig.Servers.First());
        }