diff --git a/src/main/kotlin/io/csbroker/apiserver/controller/v2/problem/response/SubmitLongProblemResponseDto.kt b/src/main/kotlin/io/csbroker/apiserver/controller/v2/problem/response/SubmitLongProblemResponseDto.kt index 80608e81..091735d3 100644 --- a/src/main/kotlin/io/csbroker/apiserver/controller/v2/problem/response/SubmitLongProblemResponseDto.kt +++ b/src/main/kotlin/io/csbroker/apiserver/controller/v2/problem/response/SubmitLongProblemResponseDto.kt @@ -4,8 +4,8 @@ data class SubmitLongProblemResponseDto( val title: String, val tags: List, val description: String, - val totalSubmissionCount: Int, - val userSubmissionCount: Int, + val totalSubmission: Int, + val userSubmission: Int, val userAnswer: String, val standardAnswer: String, ) diff --git a/src/main/kotlin/io/csbroker/apiserver/service/problem/LongProblemServiceImpl.kt b/src/main/kotlin/io/csbroker/apiserver/service/problem/LongProblemServiceImpl.kt index 87878dc2..5f0eefc3 100644 --- a/src/main/kotlin/io/csbroker/apiserver/service/problem/LongProblemServiceImpl.kt +++ b/src/main/kotlin/io/csbroker/apiserver/service/problem/LongProblemServiceImpl.kt @@ -178,8 +178,8 @@ class LongProblemServiceImpl( title = problem.title, tags = tags, description = problem.description, - totalSubmissionCount = totalSubmissionCount, - userSubmissionCount = userSubmissionCount, + totalSubmission = totalSubmissionCount, + userSubmission = userSubmissionCount, userAnswer = answer, standardAnswer = standardAnswer, ) diff --git a/src/test/kotlin/io/csbroker/apiserver/controller/v1/problem/LongProblemControllerTest.kt b/src/test/kotlin/io/csbroker/apiserver/controller/v1/problem/LongProblemControllerTest.kt index ee43c53e..c5bfd7c7 100644 --- a/src/test/kotlin/io/csbroker/apiserver/controller/v1/problem/LongProblemControllerTest.kt +++ b/src/test/kotlin/io/csbroker/apiserver/controller/v1/problem/LongProblemControllerTest.kt @@ -216,8 +216,8 @@ class LongProblemControllerTest : RestDocsTest() { title = "title", tags = listOf("tag1", "tag2", "tag3"), description = "description", - totalSubmissionCount = 100, - userSubmissionCount = 10, + totalSubmission = 100, + userSubmission = 10, userAnswer = "user answer", standardAnswer = "standard answer", ) @@ -255,9 +255,9 @@ class LongProblemControllerTest : RestDocsTest() { fieldWithPath("data.title").type(JsonFieldType.STRING).description("문제 제목"), fieldWithPath("data.tags").type(JsonFieldType.ARRAY).description("태그"), fieldWithPath("data.description").type(JsonFieldType.STRING).description("문제 설명"), - fieldWithPath("data.totalSubmissionCount").type(JsonFieldType.NUMBER) + fieldWithPath("data.totalSubmission").type(JsonFieldType.NUMBER) .description("해당 문제에 대해 전체 유저가 제출한 수 (총 제출 수)"), - fieldWithPath("data.userSubmissionCount").type(JsonFieldType.NUMBER) + fieldWithPath("data.userSubmission").type(JsonFieldType.NUMBER) .description("해당 문제에 대해 유저가 제출한 수 "), fieldWithPath("data.userAnswer").type(JsonFieldType.STRING).description("유저의 답변"), fieldWithPath("data.standardAnswer").type(JsonFieldType.STRING).description("모범 답안"), diff --git a/src/test/kotlin/io/csbroker/apiserver/controller/v1/problem/LongProblemIntegrationTest.kt b/src/test/kotlin/io/csbroker/apiserver/controller/v1/problem/LongProblemIntegrationTest.kt index 90bb93e4..37aedf82 100644 --- a/src/test/kotlin/io/csbroker/apiserver/controller/v1/problem/LongProblemIntegrationTest.kt +++ b/src/test/kotlin/io/csbroker/apiserver/controller/v1/problem/LongProblemIntegrationTest.kt @@ -77,8 +77,8 @@ class LongProblemIntegrationTest : IntegrationTest() { val responseDto = objectMapper.readValue(dataAsString) responseDto.title shouldBe problem.title responseDto.description shouldBe problem.description - responseDto.totalSubmissionCount shouldBe preSubmissionCount + 1 // 제출 수가 증가하는지 확인 - responseDto.userSubmissionCount shouldBe preUserSubmissionCount + 1 // 제출 수가 증가하는지 확인 + responseDto.totalSubmission shouldBe preSubmissionCount + 1 // 제출 수가 증가하는지 확인 + responseDto.userSubmission shouldBe preUserSubmissionCount + 1 // 제출 수가 증가하는지 확인 responseDto.userAnswer shouldBe userAnswer standardAnswers.map { sa -> sa.content } shouldContain responseDto.standardAnswer // 모법답안중 하나가 반환되는지 확인 }