Skip to content

Commit d47632e

Browse files
committed
test: adjust the unit CategoryService
1 parent 4abf14a commit d47632e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/test/java/fun/trackmoney/category/service/CategoryServiceTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ void findById_shouldReturnCategory_whenIdExists() {
5454
CategoryEntity expectedCategory = new CategoryEntity();
5555
expectedCategory.setCategoryId(categoryId);
5656
expectedCategory.setName("Food");
57+
expectedCategory.setColor("#fffff");
5758

5859
when(categoryRepository.findById(categoryId)).thenReturn(Optional.of(expectedCategory));
5960

@@ -63,6 +64,7 @@ void findById_shouldReturnCategory_whenIdExists() {
6364
// Assert
6465
assertEquals(expectedCategory.getCategoryId(), actualCategory.getCategoryId());
6566
assertEquals(expectedCategory.getName(), actualCategory.getName());
67+
assertEquals(expectedCategory.getColor(), actualCategory.getColor());
6668
}
6769

6870
@Test

0 commit comments

Comments
 (0)