public void TestGetConfigs() { using var maintainer = new ConfigIndexMaintainer(Config, Log); CollectionAssert.IsEmpty(maintainer.GetConfigs()); var indexConfig = new IndexConfig { IndexName = "ABC" }; maintainer.AddIndexConfig(indexConfig); CollectionAssert.AreEquivalent(new[] { indexConfig }, maintainer.GetConfigs()); }
public void TestEditConfig() { using var maintainer = new ConfigIndexMaintainer(Config, Log); var indexConfig = new IndexConfig { IndexName = "ABC" }; maintainer.AddIndexConfig(indexConfig); CollectionAssert.AreEquivalent(new[] { indexConfig }, maintainer.GetConfigs()); maintainer.EditIndexConfig(indexConfig with { IndexName = "EFG" }); CollectionAssert.AreEquivalent(new[] { indexConfig with {