private static IMyCouchClient CreateDbClient(string dbName) { var config = Environment; var connectionInfo = new DbConnectionInfo(config.ServerUrl, dbName); if (config.HasCredentials()) { connectionInfo.BasicAuth = new BasicAuthString(config.User, config.Password); } if (config.IsAgainstCloudant()) { var bootstrapper = new MyCouchCloudantClientBootstrapper { DbConnectionFn = cnInfo => new CustomCloudantDbConnection(cnInfo) }; return(new MyCouchCloudantClient(connectionInfo, bootstrapper)); } return(new MyCouchClient(connectionInfo)); }
public SearchIndexHttpRequestFactoryTests() { var boostrapper = new MyCouchCloudantClientBootstrapper(); SUT = new SearchIndexHttpRequestFactory(boostrapper.DocumentSerializerFn(), boostrapper.SerializerFn()); }