Skip to content
Snippets Groups Projects

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

Merged Harry Linrui Xu requested to merge improve-test-coverage into master
1 file
+ 3
0
Compare changes
  • Side-by-side
  • Inline
@@ -134,8 +134,11 @@ public class FileHandling{
line = line.replace(FileHandling.category, "");
expenseCategory = switch (line) {
case "FOOD" -> ExpenseCategory.FOOD;
case "RENT" -> ExpenseCategory.RENT;
case "CLOTHES" -> ExpenseCategory.CLOTHES;
case "BOOKS" -> ExpenseCategory.BOOKS;
case "HEALTH" -> ExpenseCategory.HEALTH;
case "ACTIVITIES" -> ExpenseCategory.ACTIVITIES;
default -> ExpenseCategory.OTHER;
};
}
Loading