public void TestValidUrl() { ElasticSearchContext context = new ElasticSearchContext("http://www.nu.nl"); Assert.IsNotNull(context); Assert.IsTrue(!String.IsNullOrEmpty(context.Url)); }
public void TestContextSetup() { var context = new ElasticSearchContext("http://www.nu.nl"); Assert.IsNotNull(context); Assert.IsNotNull(context.Url); }
public void TestInvalidUrl() { Assert.ThrowsException <Exception>(() => { try { var context = new ElasticSearchContext("uiyuiyuiy"); } catch (Exception e) { throw new Exception("Something wrong URI", e); } }); }
private void Dispose(bool disposing) { if (!disposing) { return; } if (context != null) { context.Dispose(); context = null; } if (ElasticSearchContext != null) { ElasticSearchContext = null; } }
public ElasticSearchCommand(ElasticSearchContext esContext) { ContractUtility.Requires <ArgumentNullException>(esContext != null, "esContext instance cannot be null"); _elasticsearchContext = esContext.ElasticsearchContext; }
public ElasticSearchQuery(ElasticSearchContext esContext) { ContractUtility.Requires <ArgumentNullException>(esContext != null, "esContext instance cannot be null"); _elasticsearchContext = esContext.ElasticsearchContext; _elasticsearchQuery = esContext.Query <TEntity>(); }
public ElasticSearchRepository(ElasticSearchContext elasticSearchContext = null) { _elasticSearchContext = elasticSearchContext != null ? elasticSearchContext : new ElasticSearchContext(); }
public SearchRepository(ElasticSearchContext client) { _client = client._client; }