Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Change Singleton to Transient * Update account details model Change to WhenAll for fetching account details * Remove uneccessary properties from bank models Add log text that explains which field went wrong when serializing * Refactor and enhance banking service and tests - Update `BankClient_v2.cs` to adjust JSON properties and make `CreditDebitIndicator` nullable. - Add `AccountExtensions.cs` with error logging method. - Add `HasErrors` property to `AccountV2` in `BankResponse.cs`. - Enhance `GetAccountDetailsV2` in `BankService.cs` for better error handling and logging. - Update `Altinn.Dan.Plugin.Banking.Test.csproj` to target `net8.0`, add `FakeItEasy`, and reference `Altinn.Dan.Plugin.Banking`. - Add `FakeableHttpMessageHandler.cs` for handling HTTP requests in tests and generating certificates. - Add `BankServiceTests.cs` with comprehensive unit tests for `BankService`. - Remove obsolete `UnitTest1.cs`. * Fix failed tests * Nullable enabled Remove all required and add back some Remove roles Remove unused extension Remove unused usings Add tests * Fix property references a bit after introducing nullable enable * Fix balances * Fix parallel request issues in GetAccounts method Modified GetAccounts in BankService to fetch account details sequentially instead of in parallel to avoid 200 OK Internal Server Errors from Nordea. Added try-catch block to handle ApiException for each account individually, logging and adding default values for accounts with errors. Non-API exceptions are rethrown. Added comments explaining changes.
- Loading branch information