public async Task FindByEmail_Test() { var store = new ElasticUserStore <ElasticUser, ElasticRole>(_nestClient, new ElasticOptions { UsersIndex = _userIndex }); var user1 = new ElasticUser { UserName = "******", PasswordHash = "phash", Logins = new List <ElasticUserLogin> { new ElasticUserLogin(new UserLoginInfo("prov1", "key1", "test1")) }, Email = new ElasticConfirmation("*****@*****.**") }; var user2 = new ElasticUser { UserName = "******", PasswordHash = "phash", Logins = new List <ElasticUserLogin> { new ElasticUserLogin(new UserLoginInfo("prov2", "key2", "test2")) }, Email = new ElasticConfirmation("*****@*****.**") }; var createResult1 = await store.CreateAsync(user1, NoCancellationToken); var createResult2 = await store.CreateAsync(user2, NoCancellationToken); var elasticUser = await store.FindByEmailAsync("*****@*****.**", NoCancellationToken); Assert.Equal(createResult1, IdentityResult.Success); Assert.Equal(createResult2, IdentityResult.Success); Assert.Equal(user2.Id, elasticUser.Id); }