test: adapt exam idempotency test to model service constructor
This commit is contained in:
+5
-1
@@ -3,6 +3,7 @@ package org.dromara.aihr.learning;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import org.dromara.aihr.learning.AihrLearningDto.ExamAnswerResult;
|
||||
import org.dromara.aihr.learning.AihrLearningDto.ExamSubmitResponse;
|
||||
import org.dromara.aihr.service.AihrModelSeedService;
|
||||
import org.junit.jupiter.api.Tag;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
@@ -31,7 +32,10 @@ class AihrExamIdempotencyTest {
|
||||
|
||||
@Test
|
||||
void retryWithSameRequestIdRestoresTheCompleteOriginalPerQuestionResult() throws Exception {
|
||||
AihrExamService service = new AihrExamService(new ReplayJdbcTemplate(), new ObjectMapper());
|
||||
ReplayJdbcTemplate jdbcTemplate = new ReplayJdbcTemplate();
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
AihrExamService service = new AihrExamService(jdbcTemplate, objectMapper,
|
||||
new AihrModelSeedService(objectMapper, jdbcTemplate));
|
||||
ExamSubmitResponse expected = new ExamSubmitResponse(
|
||||
42L, "SUBMITTED", 40, false, "2026-07-17 10:11:12",
|
||||
List.of(
|
||||
|
||||
Reference in New Issue
Block a user