Skip to content
Snippets Groups Projects
Commit 6e32c9dd authored by Harry Linrui Xu's avatar Harry Linrui Xu
Browse files

Merge branch 'improve-test-coverage' into 'master'

Fixed switch case in FileHandling to account for the new expense categories

See merge request !57
parents ae904cc9 f8791808
No related branches found
No related tags found
1 merge request!57Fixed switch case in FileHandling to account for the new expense categories
Pipeline #220825 passed with stages
in 1 minute and 40 seconds
...@@ -134,8 +134,11 @@ public class FileHandling{ ...@@ -134,8 +134,11 @@ public class FileHandling{
line = line.replace(FileHandling.category, ""); line = line.replace(FileHandling.category, "");
expenseCategory = switch (line) { expenseCategory = switch (line) {
case "FOOD" -> ExpenseCategory.FOOD; case "FOOD" -> ExpenseCategory.FOOD;
case "RENT" -> ExpenseCategory.RENT;
case "CLOTHES" -> ExpenseCategory.CLOTHES; case "CLOTHES" -> ExpenseCategory.CLOTHES;
case "BOOKS" -> ExpenseCategory.BOOKS; case "BOOKS" -> ExpenseCategory.BOOKS;
case "HEALTH" -> ExpenseCategory.HEALTH;
case "ACTIVITIES" -> ExpenseCategory.ACTIVITIES;
default -> ExpenseCategory.OTHER; default -> ExpenseCategory.OTHER;
}; };
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment