Open sweep-ai[bot] opened 1 year ago
SonarCloud Quality Gate failed.
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
0.0% Coverage
0.0% Duplication
Catch issues before they fail your Quality Gate with our IDE extension SonarLint
PR Feedback (click)
Description
This PR adds unit tests for the TransactionsListViewModel in the CashBud application. The TransactionsListViewModel is responsible for managing the transactions list screen and interacts with a TransactionsManagerProtocol to perform operations such as fetching transactions, sorting transactions, deleting transactions, calculating costs per month, getting icon strings, and making recurrence descriptions.
The unit tests cover all the public methods in the ViewModel, including getTransactions(), sortTransactions(), deleteTransactionAndUpdate(at:), calculateCostsPerMonth(for:), getIconString(for:), and makeRecurrenceDescription(recurrence:). The tests also cover the initialization of the ViewModel and the setting of its properties. Mock objects are used to simulate the behavior of the TransactionsManagerProtocol and test data is used for transactions.
Summary of Changes
Fixes #93.
๐ Latest improvements to Sweep:
๐ก To get Sweep to edit this pull request, you can: