Add tests
This commit is contained in:
1 parent
d5127c7405
commit
88aaaecb1a
15 files changed
+1755
-34
No files matched your search
@@ -2,18 +2,11 @@ using BudgetApp.Data;
|
||||
|
||||
namespace BudgetApp.Services;
|
||||
|
||||
public class DashboardService
|
||||
public class DashboardService(TransactionService transactionService, AccountService accountService, CategoryService categoryService)
|
||||
{
|
||||
private readonly TransactionService _transactionService;
|
||||
private readonly AccountService _accountService;
|
||||
private readonly CategoryService _categoryService;
|
||||
|
||||
public DashboardService(TransactionService transactionService, AccountService accountService, CategoryService categoryService)
|
||||
{
|
||||
_transactionService = transactionService;
|
||||
_accountService = accountService;
|
||||
_categoryService = categoryService;
|
||||
}
|
||||
private readonly TransactionService _transactionService = transactionService;
|
||||
private readonly AccountService _accountService = accountService;
|
||||
private readonly CategoryService _categoryService = categoryService;
|
||||
|
||||
public async Task<DashboardData> GetDashboardDataAsync(string userId, DateTime? from = null, DateTime? to = null)
|
||||
{
|
||||
@@ -53,7 +46,7 @@ public class DashboardService
|
||||
};
|
||||
}
|
||||
|
||||
private static ChartData BuildChartData(List<Account> accounts, List<Transaction> transactions, DateTime startDate, DateTime endDate)
|
||||
internal static ChartData BuildChartData(List<Account> accounts, List<Transaction> transactions, DateTime startDate, DateTime endDate)
|
||||
{
|
||||
var today = DateTime.Today;
|
||||
var labels = new List<string>();
|
||||
|
||||
Reference in new issue
Block a user