Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
dojinyou committed Sep 29, 2023
1 parent f38da04 commit cd62025
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ abstract class BaseEntity(
@Column(nullable = false, updatable = false)
var createdAt: LocalDateTime = LocalDateTime.now(ZONE_ID)
protected set

@Column(nullable = false)
var updatedAt: LocalDateTime = LocalDateTime.now(ZONE_ID)
protected set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@ class Category() : BaseEntity() {
companion object {
const val MAX_NAME_LENGTH = 31
}

}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
package com.mjucow.eatda.domain.store.service.command.dto


data class UpdateNameCommand(val name: String)
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.mjucow.eatda.domain.store.service.query.dto

data class Categories(
val categoryList: List<CategoryDto>
val categoryList: List<CategoryDto>,
) : ArrayList<CategoryDto>(categoryList)
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class CategoryController(
@ResponseStatus(HttpStatus.OK)
fun updateNameById(
@PathVariable("categoryId") id: Long,
@RequestBody command: UpdateNameCommand
@RequestBody command: UpdateNameCommand,
) {
categoryCommandService.updateName(id, command)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import org.springframework.context.annotation.Import
import org.springframework.data.repository.findByIdOrNull

@Import(CategoryCommandService::class)
class CategoryCommandServiceDataTest: AbstractDataTest() {
class CategoryCommandServiceDataTest : AbstractDataTest() {

@Autowired
lateinit var categoryCommandService: CategoryCommandService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ import org.springframework.beans.factory.annotation.Autowired
import org.springframework.context.annotation.Import

@Import(CategoryQueryService::class)
class CategoryQueryServiceDataTest: AbstractDataTest() {
class CategoryQueryServiceDataTest : AbstractDataTest() {
@Autowired
lateinit var categoryQueryService: CategoryQueryService

@Autowired
lateinit var repository: CategoryRepository

Expand All @@ -24,7 +25,6 @@ class CategoryQueryServiceDataTest: AbstractDataTest() {
fun returnNullWhenNotFoundId(id: Long) {
// given


// when
val domain = categoryQueryService.findById(id)

Expand Down Expand Up @@ -69,5 +69,4 @@ class CategoryQueryServiceDataTest: AbstractDataTest() {
// then
assertThat(categories).isNotEmpty
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class CategoryMvcTest : AbstractMockMvcTest() {

@MockBean
lateinit var categoryQueryService: CategoryQueryService

@MockBean
lateinit var categoryCommandService: CategoryCommandService

Expand Down Expand Up @@ -60,7 +61,7 @@ class CategoryMvcTest : AbstractMockMvcTest() {
fieldWithPath("message").type(JsonFieldType.STRING).description("에러 메세지"),
fieldWithPath("body").type(JsonFieldType.ARRAY).description("카테고리 데이터들"),
fieldWithPath("body[].id").type(JsonFieldType.NUMBER).description("카테고리 식별자"),
fieldWithPath("body[].name").type(JsonFieldType.STRING).description("카테고리 이름"),
fieldWithPath("body[].name").type(JsonFieldType.STRING).description("카테고리 이름")
)
)
)
Expand Down Expand Up @@ -93,7 +94,7 @@ class CategoryMvcTest : AbstractMockMvcTest() {
fieldWithPath("message").type(JsonFieldType.STRING).description("에러 메세지"),
fieldWithPath("body").type(JsonFieldType.OBJECT).description("카테고리 데이터"),
fieldWithPath("body.id").type(JsonFieldType.NUMBER).description("카테고리 식별자"),
fieldWithPath("body.name").type(JsonFieldType.STRING).description("카테고리 이름"),
fieldWithPath("body.name").type(JsonFieldType.STRING).description("카테고리 이름")
)
)
)
Expand Down Expand Up @@ -179,7 +180,7 @@ class CategoryMvcTest : AbstractMockMvcTest() {
parameterWithName("category-id").description("카테고리 식별자")
)
.requestFields(
fieldWithPath("name").type(JsonFieldType.STRING).description("카테고리 이름"),
fieldWithPath("name").type(JsonFieldType.STRING).description("카테고리 이름")
)
)
)
Expand Down

0 comments on commit cd62025

Please sign in to comment.