public void TestFixtureSetUp() { var existsDtoForTests = new ExistsDtoForTests { Id = 1, Description = "Test index for exist tests" }; _elasticsearchMappingResolver.AddElasticSearchMappingForEntityType(typeof(ExistsDtoForTestsTypeNot), new IndexMapping("existsdtofortestss")); using (var context = new ElasticsearchContext(ConnectionString, _elasticsearchMappingResolver)) { context.AddUpdateDocument(existsDtoForTests, existsDtoForTests.Id); context.SaveChanges(); var result = context.AliasCreateForIndex("existsaliastest", "existsdtofortestss"); Assert.IsTrue(result); } }