public async Task SqlUserStoreMethodsThrowWhenDisposedTest()
        {
            var store = new ArangoUserStore(Container.ArangoRepository.Context);

            store.Dispose();
            await Assert.ThrowsAsync <ObjectDisposedException>(async() => await store.AddClaimsAsync(null, null));

            await Assert.ThrowsAsync <ObjectDisposedException>(async() => await store.AddLoginAsync(null, null));

            await Assert.ThrowsAsync <ObjectDisposedException>(async() => await store.AddToRoleAsync(null, null));

            await Assert.ThrowsAsync <ObjectDisposedException>(async() => await store.GetClaimsAsync(null));

            await Assert.ThrowsAsync <ObjectDisposedException>(async() => await store.GetLoginsAsync(null));

            await Assert.ThrowsAsync <ObjectDisposedException>(async() => await store.GetRolesAsync(null));

            await Assert.ThrowsAsync <ObjectDisposedException>(async() => await store.IsInRoleAsync(null, null));

            await Assert.ThrowsAsync <ObjectDisposedException>(async() => await store.RemoveClaimsAsync(null, null));

            await Assert.ThrowsAsync <ObjectDisposedException>(async() => await store.RemoveLoginAsync(null, null, null));

            await Assert.ThrowsAsync <ObjectDisposedException>(
                async() => await store.RemoveFromRoleAsync(null, null));

            await Assert.ThrowsAsync <ObjectDisposedException>(async() => await store.RemoveClaimsAsync(null, null));

            await Assert.ThrowsAsync <ObjectDisposedException>(async() => await store.ReplaceClaimAsync(null, null, null));

            await Assert.ThrowsAsync <ObjectDisposedException>(async() => await store.FindByLoginAsync(null, null));

            await Assert.ThrowsAsync <ObjectDisposedException>(async() => await store.FindByIdAsync(null));

            await Assert.ThrowsAsync <ObjectDisposedException>(async() => await store.FindByNameAsync(null));

            await Assert.ThrowsAsync <ObjectDisposedException>(async() => await store.CreateAsync(null));

            await Assert.ThrowsAsync <ObjectDisposedException>(async() => await store.UpdateAsync(null));

            await Assert.ThrowsAsync <ObjectDisposedException>(async() => await store.DeleteAsync(null));

            await Assert.ThrowsAsync <ObjectDisposedException>(
                async() => await store.SetEmailConfirmedAsync(null, true));

            await Assert.ThrowsAsync <ObjectDisposedException>(async() => await store.GetEmailConfirmedAsync(null));

            await Assert.ThrowsAsync <ObjectDisposedException>(
                async() => await store.SetPhoneNumberConfirmedAsync(null, true));

            await Assert.ThrowsAsync <ObjectDisposedException>(
                async() => await store.GetPhoneNumberConfirmedAsync(null));
        }
        public async Task UserStorePublicNullCheckTest()
        {
            Assert.Throws <ArgumentNullException>("context", () => new ArangoUserStore(null));
            var store = new ArangoUserStore(Container.ArangoRepository.Context);
            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.GetUserIdAsync(null));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.GetUserNameAsync(null));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.SetUserNameAsync(null, null));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.CreateAsync(null));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.UpdateAsync(null));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.DeleteAsync(null));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.AddClaimsAsync(null, null));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.ReplaceClaimAsync(null, null, null));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.RemoveClaimsAsync(null, null));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.GetClaimsAsync(null));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.GetLoginsAsync(null));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.GetRolesAsync(null));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.AddLoginAsync(null, null));

            await
            Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.RemoveLoginAsync(null, null, null));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.AddToRoleAsync(null, null));

            await
            Assert.ThrowsAsync <ArgumentNullException>("user",
                                                       async() => await store.RemoveFromRoleAsync(null, null));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.IsInRoleAsync(null, null));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.GetPasswordHashAsync(null));

            await
            Assert.ThrowsAsync <ArgumentNullException>("user",
                                                       async() => await store.SetPasswordHashAsync(null, null));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.GetSecurityStampAsync(null));

            await Assert.ThrowsAsync <ArgumentNullException>("user",
                                                             async() => await store.SetSecurityStampAsync(null, null));

            await Assert.ThrowsAsync <ArgumentNullException>("login", async() => await store.AddLoginAsync(new ArangoIdentityUser("fake"), null));

            await Assert.ThrowsAsync <ArgumentNullException>("claims",
                                                             async() => await store.AddClaimsAsync(new ArangoIdentityUser("fake"), null));

            await Assert.ThrowsAsync <ArgumentNullException>("claims",
                                                             async() => await store.RemoveClaimsAsync(new ArangoIdentityUser("fake"), null));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.GetEmailConfirmedAsync(null));

            await Assert.ThrowsAsync <ArgumentNullException>("user",
                                                             async() => await store.SetEmailConfirmedAsync(null, true));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.GetEmailAsync(null));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.SetEmailAsync(null, null));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.GetPhoneNumberAsync(null));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.SetPhoneNumberAsync(null, null));

            await Assert.ThrowsAsync <ArgumentNullException>("user",
                                                             async() => await store.GetPhoneNumberConfirmedAsync(null));

            await Assert.ThrowsAsync <ArgumentNullException>("user",
                                                             async() => await store.SetPhoneNumberConfirmedAsync(null, true));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.GetTwoFactorEnabledAsync(null));

            await Assert.ThrowsAsync <ArgumentNullException>("user",
                                                             async() => await store.SetTwoFactorEnabledAsync(null, true));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.GetAccessFailedCountAsync(null));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.GetLockoutEnabledAsync(null));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.SetLockoutEnabledAsync(null, false));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.GetLockoutEndDateAsync(null));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.SetLockoutEndDateAsync(null, new DateTimeOffset()));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.ResetAccessFailedCountAsync(null));

            await Assert.ThrowsAsync <ArgumentNullException>("user", async() => await store.IncrementAccessFailedCountAsync(null));

            await Assert.ThrowsAsync <ArgumentException>("normalizedRoleName", async() => await store.AddToRoleAsync(new ArangoIdentityUser("fake"), null));

            await Assert.ThrowsAsync <ArgumentException>("normalizedRoleName", async() => await store.RemoveFromRoleAsync(new ArangoIdentityUser("fake"), null));

            await Assert.ThrowsAsync <ArgumentException>("normalizedRoleName", async() => await store.IsInRoleAsync(new ArangoIdentityUser("fake"), null));

            await Assert.ThrowsAsync <ArgumentException>("normalizedRoleName", async() => await store.AddToRoleAsync(new ArangoIdentityUser("fake"), ""));

            await Assert.ThrowsAsync <ArgumentException>("normalizedRoleName", async() => await store.RemoveFromRoleAsync(new ArangoIdentityUser("fake"), ""));

            await Assert.ThrowsAsync <ArgumentException>("normalizedRoleName", async() => await store.IsInRoleAsync(new ArangoIdentityUser("fake"), ""));
        }