private static List <Func <object> > UserCommands(ElasticClient elastic) { return(new List <Func <object> > { () => elastic.PutRole("test_role_1"), // () => elastic.PutRoleMapping("test_role_1"), () => elastic.GetRole(new GetRoleRequest("test_role_1")), // () => elastic.GetRoleMapping(new GetRoleMappingRequest("test_role_1")), // () => elastic.DeleteRoleMapping("test_role_1"), () => elastic.DeleteRole("test_role_1"), () => elastic.PutUser("test_user_1"), () => elastic.ChangePassword(new ChangePasswordRequest("test_user_1") { Password = "******", }), () => elastic.GetUser(new GetUserRequest("test_user_1")), //() => elastic.DisableUser("test_user_1"), () => elastic.DeleteUser("test_user_1"), }); }