Skip to content

Commit

Permalink
refactor: 중복 setter 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Ogu1208 committed Aug 4, 2024
1 parent 3088bed commit 6877a3e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ open class BaseTimeEntity {
@DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
var deletedAt: LocalDateTime? = null // 삭제일시


protected fun setDeletedAt(deletedAt: LocalDateTime) {
this.deletedAt = deletedAt
}

override fun toString(): String {
return "BaseTimeEntity(createdAt=$createdAt, modifiedAt=$modifiedAt, deletedAt=$deletedAt)"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,6 @@ class CategoryServiceTest {
assertEquals("Type1", result.categoryType)
}

@Test
fun `getCategory should throw exception for invalid id`() {
// Given
`when`(categoryRepository.findById(1L)).thenReturn(Optional.empty())

// When/Then
val exception = assertThrows<ResponseStatusException> {
categoryService.getCategory(1L)
}
assertEquals(HttpStatus.BAD_REQUEST, exception.status)
}

@Test
fun `createCategory should save and return new category id`() {
// Given
Expand Down

0 comments on commit 6877a3e

Please sign in to comment.