public void GetDefaultIndexFromConnectionString(string connectionString, string expectedResult) { //act var defaultIndex = ElasticClientSingleton.GetDefaultIndexFromConnectionString(connectionString); //assert Assert.AreEqual(expectedResult, defaultIndex); }
public void RemoveDefaultIndexFromConnectionString(string connectionString, string expectedResult) { //act var connectionStringOnly = ElasticClientSingleton.RemoveDefaultIndexFromConnectionString(connectionString); //assert Assert.AreEqual(expectedResult, connectionStringOnly); }
public void GetDefaultIndex_FromElmahConfig() { //arrange const string connectionString = "http://localhost:9200/"; const string expectedDefaultIndex = "defaultFromConfig"; var dict = new Dictionary <string, string> { { "defaultIndex", expectedDefaultIndex } }; //act var defaultIndex = ElasticClientSingleton.GetDefaultIndex(dict, connectionString); //assert Assert.AreEqual(expectedDefaultIndex.ToLower(), defaultIndex); }
public void RemoveTralingSlash(string origString, string expectedString) { string newString = ElasticClientSingleton.RemoveTrailingSlash(origString); Assert.AreEqual(expectedString, newString); }