public async void AccountRepositoryIntegration() { using var session = _SessionFactory.OpenSession(); using var transaction = session.BeginTransaction(); var accountRepository = new AccountRepository { Session = session }; var account = new Account() { AccountName = "testaccount", HashedPassword = "******" }; // Create account await accountRepository.AddNewAccountAsync(account); // Check if account exists var exists = await accountRepository.ExistsAsync("testaccount"); Assert.True(exists); // Fetch account by name account = await accountRepository.GetAccountByNameAsync("testaccount"); Assert.NotNull(account); Assert.Equal("testaccount", account.AccountName); // Change password account.HashedPassword = "******"; await accountRepository.UpdateAccountAsync(account); // Check if account can be fetched by id account = await accountRepository.GetAccountByIdAsync(account.AccountId); Assert.NotNull(account); Assert.Equal("testaccount", account.AccountName); Assert.Equal("999999999999999999999999999999999999999999999999", account.HashedPassword); await session.FlushAsync(); await transaction.CommitAsync(); }