public void InstantiateUnderlyingSession_ElasticsearchConnectionString_IClient() { var factory = new ElasticsearchClientFactory(); var client = factory.Instantiate($@"Hostname=localhost;port=9200;Username=admin;password=p@ssw0rd;api=Elasticsearch"); Assert.That(client.UnderlyingSessionType, Is.EqualTo(typeof(ElasticsearchClientOperation))); }
public void Instantiate_ElasticsearchUri_ElasticsearchClient() { var factory = new ElasticsearchClientFactory(); var client = factory.Instantiate($@"elasticsearch://locahost"); Assert.That(client, Is.Not.Null); Assert.That(client, Is.TypeOf <ElasticsearchClient>()); }
public void Instantiate_ElasticsearchTokens_ElasticsearchClient() { var factory = new ElasticsearchClientFactory(); var client = factory.Instantiate($@"Hostname=localhost;port=9200;Username=admin;password=p@ssw0rd;api=Elasticsearch"); Assert.That(client, Is.Not.Null); Assert.That(client, Is.TypeOf <ElasticsearchClient>()); }
public void InstantiateCreate_ElasticsearchConnectionString_IClient() { var factory = new ElasticsearchClientFactory(); var client = factory.Instantiate($@"Hostname=localhost;port=9200;Username=admin;password=p@ssw0rd;api=Elasticsearch"); var underlyingSession = client.CreateNew(); Assert.That(underlyingSession, Is.Not.Null); Assert.That(underlyingSession, Is.AssignableTo <ElasticsearchClientOperation>()); }