-
Notifications
You must be signed in to change notification settings - Fork 1
[LNK-45] 링크 테스트 코드 작성 (Usecase) #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
The head ref may contain hidden characters: "LNK-45-Leenk-\uB9C1\uD06C-\uD14C\uC2A4\uD2B8-\uCF54\uB4DC-\uC791\uC131"
Conversation
WalkthroughKotlin 빌드 지원과 테스트 의존성 추가, Notification 엔티티를 JPA → MongoDB 기반으로 전환(및 MongoBaseEntity 추가), JPA/Mongo 설정 클래스 제거, Testcontainers 기반 테스트 설정과 다수의 Kotlin 테스트·픽스처 추가 및 기존 빈 테스트 삭제가 이루어졌습니다. Changes
Estimated code review effort🎯 3 (보통) | ⏱️ ~25분
Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
🧹 Nitpick comments (6)
src/main/java/leets/leenk/global/common/entity/MongoBaseEntity.java (2)
13-13: 일관성을 위해@NoArgsConstructor접근 제한자를 추가하는 것을 권장합니다.하위 클래스인
Notification에서는@NoArgsConstructor(access = AccessLevel.PROTECTED)를 사용하고 있습니다. 베이스 엔티티 클래스도 동일한 패턴을 따르면 일관성이 높아지고, 외부에서 직접 인스턴스화하는 것을 방지할 수 있습니다.🔎 제안하는 수정사항
+import lombok.AccessLevel; + @Getter @SuperBuilder -@NoArgsConstructor +@NoArgsConstructor(access = AccessLevel.PROTECTED) public abstract class MongoBaseEntity {
16-20: 필드 명명 규칙을 재검토하는 것을 권장합니다.
createDate와updateDate대신createdDate와updatedDate(또는createdAt/updatedAt)를 사용하는 것이 일반적인 규칙입니다. 과거분사형을 사용하면 "생성된 날짜", "수정된 날짜"라는 의미가 더 명확해집니다.🔎 제안하는 수정사항
@CreatedDate -private LocalDateTime createDate; +private LocalDateTime createdDate; @LastModifiedDate -private LocalDateTime updateDate; +private LocalDateTime updatedDate;src/main/resources/application-test.yml (1)
1-9: 줄바꿈 문자 수정 필요YAMLlint에서 감지된 대로 파일이 잘못된 줄바꿈 문자를 사용하고 있습니다. Unix 스타일 줄바꿈(
\n)을 사용하도록 수정해 주세요. IDE 설정이나.editorconfig파일에서end_of_line = lf를 설정하는 것을 권장합니다.테스트 환경 설정 자체는 적절합니다.
src/test/java/leets/leenk/config/MysqlTestConfig.java (1)
13-18: 테스트 성능 향상을 위해 컨테이너 재사용 고려현재 구현은 테스트 컨텍스트마다 새로운 MySQL 컨테이너를 생성합니다. 테스트 실행 속도를 높이려면 컨테이너를 static으로 선언하여 재사용하는 것을 권장합니다.
🔎 컨테이너 재사용을 위한 제안
@TestConfiguration public class MysqlTestConfig { private static final String MYSQL_IMAGE = "mysql:8.0.41"; + private static final MySQLContainer<?> MYSQL_CONTAINER = new MySQLContainer<>(MYSQL_IMAGE) + .withDatabaseName("testdb") + .withReuse(true); + @Bean @ServiceConnection public MySQLContainer<?> mysqlContainer() { - return new MySQLContainer<>(MYSQL_IMAGE) - .withDatabaseName("testdb"); + return MYSQL_CONTAINER; } }src/test/java/leets/leenk/config/TestContainersTest.java (1)
28-28: 디버그용 출력문 제거 권장
System.out.println은 테스트 코드에서 불필요한 노이즈를 생성합니다. 필요한 경우 로거를 사용하거나 제거하는 것을 권장합니다.🔎 제안
- System.out.println("MySQL Container JDBC URL: " + mysqlContainer.getJdbcUrl());src/test/java/leets/leenk/domain/leenk/application/usecase/LeenkUsecaseTest.kt (1)
51-71: LeenkUsecase 생성자 호출 개선 권장익명
mockk()호출이 많아 가독성이 떨어지고, 생성자 파라미터 순서가 변경되면 테스트가 조용히 실패할 수 있습니다. 명명된 파라미터를 사용하거나 별도의 팩토리 함수를 만드는 것을 권장합니다.🔎 가독성 개선 예시
생성자 파라미터에 주석을 추가하거나, 필요한 의존성만 실제 mock으로 설정하고 나머지는 relaxed mock으로 처리할 수 있습니다:
// relaxed = true로 모든 미사용 의존성을 자동 스텁 private fun createLeenkUsecase() = LeenkUsecase( leenkSaveService = mockk(relaxed = true), leenkDeleteService = mockk(relaxed = true), leenkGetService = leenkGetService, // ... 명명된 파라미터 사용 )
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (15)
build.gradle(2 hunks)src/main/java/leets/leenk/domain/notification/domain/entity/Notification.java(1 hunks)src/main/java/leets/leenk/global/common/entity/MongoBaseEntity.java(1 hunks)src/main/java/leets/leenk/global/config/JpaConfig.java(0 hunks)src/main/java/leets/leenk/global/config/MongoConfig.java(0 hunks)src/main/resources/application-test.yml(1 hunks)src/test/java/leets/leenk/LeenkApplicationTests.java(0 hunks)src/test/java/leets/leenk/config/MysqlTestConfig.java(1 hunks)src/test/java/leets/leenk/config/TestContainersTest.java(1 hunks)src/test/java/leets/leenk/domain/leenk/application/usecase/LeenkUsecaseTest.kt(1 hunks)src/test/java/leets/leenk/domain/leenk/test/fixture/LeenkParticipantsTestFixture.kt(1 hunks)src/test/java/leets/leenk/domain/leenk/test/fixture/LeenkTestFixture.kt(1 hunks)src/test/java/leets/leenk/domain/leenk/test/fixture/LocationTestFixture.kt(1 hunks)src/test/java/leets/leenk/domain/user/domain/repository/UserRepositoryTest.java(1 hunks)src/test/java/leets/leenk/domain/user/test/fixture/UserTestFixture.kt(1 hunks)
💤 Files with no reviewable changes (3)
- src/main/java/leets/leenk/global/config/JpaConfig.java
- src/main/java/leets/leenk/global/config/MongoConfig.java
- src/test/java/leets/leenk/LeenkApplicationTests.java
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-11-03T11:36:54.388Z
Learnt from: hyxklee
Repo: Leets-Makers/Leenk-BE PR: 72
File: src/main/java/leets/leenk/domain/birthday/application/util/BirthdayChecker.java:10-16
Timestamp: 2025-11-03T11:36:54.388Z
Learning: In the Leenk-BE project (leets.leenk package), timezone handling is configured at the container/infrastructure level rather than in application code. LocalDate.now() and similar methods are used without explicit timezone parameters because the container timezone is set during deployment.
Applied to files:
src/test/java/leets/leenk/domain/leenk/test/fixture/LeenkParticipantsTestFixture.ktsrc/test/java/leets/leenk/domain/leenk/test/fixture/LeenkTestFixture.kt
🧬 Code graph analysis (2)
src/main/java/leets/leenk/global/common/entity/MongoBaseEntity.java (1)
src/main/java/leets/leenk/domain/notification/domain/entity/Notification.java (1)
SuperBuilder(12-37)
src/main/java/leets/leenk/domain/notification/domain/entity/Notification.java (1)
src/main/java/leets/leenk/global/common/entity/MongoBaseEntity.java (1)
Getter(11-21)
🪛 YAMLlint (1.37.1)
src/main/resources/application-test.yml
[error] 1-1: wrong new line character: expected \n
(new-lines)
🔇 Additional comments (11)
src/main/java/leets/leenk/domain/notification/domain/entity/Notification.java (2)
23-23:@Enumerated어노테이션 제거가 올바릅니다.Spring Data MongoDB는 기본적으로 enum을 문자열로 저장하므로
@Enumerated(EnumType.STRING)어노테이션이 필요하지 않습니다. 이 변경사항은 JPA에서 MongoDB로의 마이그레이션에 적합합니다.
4-4: MongoDB 마이그레이션이 완벽하게 수행되었습니다.다음 변경사항들을 확인했습니다:
MongoBaseEntity확장을 통한 감사 필드 상속 ✓- JPA
@Id에서 Spring Data MongoDB@Id로 변경 ✓@Document어노테이션으로 컬렉션 매핑 ✓@Enumerated제거 (MongoDB 기본 문자열 저장) ✓NotificationRepository가MongoRepository확장 ✓- 모든 서비스 레이어가 MongoDB 기반 레포지토리 사용 ✓
src/test/java/leets/leenk/domain/user/domain/repository/UserRepositoryTest.java (2)
31-70: 테스트 로직 LGTM!다양한 사용자 상태(활성, 탈퇴, 삭제, 다른 생일, null 생일)를 테스트하여
findAllUsersInBirthday메서드의 필터링 로직을 철저히 검증하고 있습니다. 이름순 정렬과 조건 검증도 적절합니다.
72-82: 생성되는 ID는 builder에서 명시적으로 설정해도 무시됨JPA 엔티티의 ID 필드가
@GeneratedValue로 설정되어 있으면createUser헬퍼에서id를 명시적으로 설정해도 데이터베이스 저장 시 무시됩니다. 테스트에서 저장된 엔티티의 실제 ID를 사용해야 한다면repository.save()반환값을 사용하세요.src/test/java/leets/leenk/domain/user/test/fixture/UserTestFixture.kt (1)
6-37: 테스트 픽스처 구현 LGTM!기본값이 잘 설정된 Kotlin 테스트 픽스처입니다. Java 테스트에서도 사용할 경우
@JvmStatic어노테이션을 추가하면UserTestFixture.Companion.createUser()대신UserTestFixture.createUser()로 호출할 수 있습니다.🔎 Java 호환성 개선 제안 (선택사항)
class UserTestFixture { companion object { + @JvmStatic fun createUser(src/test/java/leets/leenk/domain/leenk/application/usecase/LeenkUsecaseTest.kt (2)
89-199: participateLeenk 테스트 케이스 LGTM!5가지 시나리오(정상 참여, 모집 미진행, 중복 참여, 최대 인원 초과, 경계값 테스트)를 잘 커버하고 있습니다. 상태 변경과 서비스 호출 검증이 적절합니다.
201-272: closeLeenk 테스트 케이스 LGTM!4가지 시나리오(정상 마감, 권한 없음, 이미 마감됨, 완료 상태)를 잘 커버하고 있습니다. 상태 검증과 notification 호출 여부 확인이 적절합니다.
src/test/java/leets/leenk/domain/leenk/test/fixture/LocationTestFixture.kt (1)
5-17: LGTM! 깔끔한 테스트 픽스처 구현입니다.Location 엔티티 생성을 위한 팩토리 메서드가 명확하고 간결하게 구현되어 있습니다. 선택적 id 파라미터와 기본값 제공으로 테스트 작성이 편리합니다.
src/test/java/leets/leenk/domain/leenk/test/fixture/LeenkParticipantsTestFixture.kt (1)
8-24: LGTM! 참가자 엔티티 픽스처가 잘 구현되어 있습니다.LeenkParticipants 생성을 위한 팩토리 메서드가 명확하게 구현되어 있습니다.
LocalDateTime.now()를 기본값으로 사용하는 것은 프로젝트의 컨테이너 레벨 타임존 설정 방식과 일치합니다.Based on learnings, LocalDateTime.now() 사용은 이 프로젝트에서 허용됩니다.
src/test/java/leets/leenk/domain/leenk/test/fixture/LeenkTestFixture.kt (2)
9-101: 잘 구조화된 테스트 픽스처입니다.다양한 상태의 Leenk 엔티티를 생성할 수 있는 팩토리 메서드들이 잘 구현되어 있습니다. 특히 경계 테스트를 위한
createAlmostFullLeenk와 같은 헬퍼 메서드가 테스트 작성에 유용합니다.
52-66: createFullLeenk 메서드는 의도된 설정입니다.이 메서드는
participateLeenkMaxParticipantsExceededThrowsException()테스트에서 사용되며, 정원이 가득 찬 링크에 대해MaxParticipantsExceededException예외를 발생시키는 것을 검증하는 테스트 시나리오입니다. 따라서currentParticipants == maxParticipants일 때status = RECRUITING으로 설정하는 것은 "정원이 차도 여전히 모집 중 상태에서 참여 시도"라는 경계값 테스트를 위한 올바른 구성입니다.실제 비즈니스 로직에서 상태는
closeLeenk()메서드를 통해 명시적으로만CLOSED로 전환되며, 정원이 찼을 때 자동으로 상태가 변경되지 않습니다. 이는 테스트 코드의closeLeenkSuccess()테스트에서도 확인할 수 있습니다.
| // Test | ||
| testImplementation 'org.springframework.boot:spring-boot-starter-test' | ||
| testRuntimeOnly 'org.junit.platform:junit-platform-launcher' | ||
| testImplementation "org.junit.jupiter:junit-jupiter:5.8.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JUnit Jupiter 버전 다운그레이드 방지
Spring Boot 3.5.0은 JUnit Jupiter 5.12를 관리합니다. spring-boot-starter-test는 JUnit Jupiter를 포함하여 테스트 모듈을 자동으로 임포트하므로, 명시적으로 5.8.1을 선언하면 Spring Boot가 관리하는 더 최신의 버전 5.12로의 업그레이드를 방해합니다. 버전 번호를 제거하여 Spring Boot의 BOM이 관리하도록 권장합니다.
- testImplementation "org.junit.jupiter:junit-jupiter:5.8.1"
+ testImplementation "org.junit.jupiter:junit-jupiter"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| testImplementation "org.junit.jupiter:junit-jupiter:5.8.1" | |
| testImplementation "org.junit.jupiter:junit-jupiter" |
🤖 Prompt for AI Agents
In build.gradle around line 48, the testImplementation declaration pins JUnit
Jupiter to 5.8.1 which prevents Spring Boot 3.5.0's BOM from managing the
version; remove the explicit version (change testImplementation
"org.junit.jupiter:junit-jupiter:5.8.1" to testImplementation
"org.junit.jupiter:junit-jupiter") or delete the explicit dependency entirely
and rely on spring-boot-starter-test to provide JUnit so the Spring Boot BOM can
manage the JUnit Jupiter version (5.12).
| @Getter | ||
| @SuperBuilder | ||
| @NoArgsConstructor | ||
| public abstract class MongoBaseEntity { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Search for @EnableMongoAuditing in the codebase
echo "=== Searching for @EnableMongoAuditing ==="
rg -n '@EnableMongoAuditing' --type=java
echo ""
echo "=== Searching for MongoDB configuration classes ==="
# Look for common configuration class patterns
fd -e java -x grep -l "Configuration\|@Configuration" {} \; | head -20
echo ""
echo "=== Checking for MongoDbFactoryBean or MongoTemplate configuration ==="
rg -n 'MongoTemplate\|MongoRepository' --type=java -i | head -20Repository: Leets-Makers/Leenk-BE
Length of output: 987
@EnableMongoAuditing 어노테이션 설정이 누락되었습니다.
@CreatedDate와 @LastModifiedDate 어노테이션이 작동하려면 애플리케이션 설정 클래스에 @EnableMongoAuditing 어노테이션을 추가해야 합니다. 현재 설정이 없으면 createDate와 updateDate 필드가 자동으로 채워지지 않습니다. 애플리케이션 설정 파일(예: MongoConfig.java)에 @EnableMongoAuditing을 추가하세요.
🤖 Prompt for AI Agents
In src/main/java/leets/leenk/global/common/entity/MongoBaseEntity.java around
lines 11 to 14, the entity uses @CreatedDate and @LastModifiedDate but Mongo
auditing is not enabled; add @EnableMongoAuditing to your application
configuration (e.g., MongoConfig.java or the main Spring Boot application class
annotated with @Configuration) so Spring Data MongoDB will populate createDate
and updateDate automatically, and verify the config class is scanned by
component scanning (or register a dedicated @Configuration class if necessary).
src/test/java/leets/leenk/domain/leenk/application/usecase/LeenkUsecaseTest.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
♻️ Duplicate comments (1)
build.gradle (1)
48-48: JUnit Jupiter 버전 명시 제거 필요이전 리뷰에서 지적된 사항과 동일합니다. Spring Boot 3.5.0은 JUnit Jupiter 5.12를 관리하지만, 명시적으로
5.8.1을 선언하면 더 최신 버전으로의 업그레이드가 방지됩니다.spring-boot-starter-test가 JUnit Jupiter를 포함하므로, 버전 번호를 제거하여 Spring Boot BOM이 관리하도록 하세요.🔎 제안된 수정
- testImplementation "org.junit.jupiter:junit-jupiter:5.8.1" + testImplementation "org.junit.jupiter:junit-jupiter"또는
spring-boot-starter-test에 이미 포함되어 있으므로 이 줄을 완전히 제거할 수도 있습니다.
🧹 Nitpick comments (3)
build.gradle (1)
54-55: kotlin-stdlib 의존성 중복 가능성
kotlin-stdlib을 명시적으로 선언했지만, Kotlin Gradle 플러그인이 이미 표준 라이브러리를 제공합니다. 특별한 이유가 없다면 이 선언을 제거하여 플러그인이 관리하는 버전을 사용하는 것이 좋습니다.🔎 제안된 수정
testImplementation "io.mockk:mockk:1.13.10" testImplementation 'org.jetbrains.kotlin:kotlin-test-junit5' - testImplementation 'org.jetbrains.kotlin:kotlin-stdlib'src/test/java/leets/leenk/domain/leenk/application/usecase/LeenkUsecaseTest.kt (2)
48-68: 많은 목 파라미터로 인한 유지보수성 문제LeenkUsecase 생성자에 17개의 파라미터가 전달되고 있으며, 그 중 13개가 익명
mockk()인스턴스입니다. 생성자 파라미터 순서가 변경되면 테스트가 깨질 수 있습니다.더 나은 접근법은 테스트에 필요한 목만 명시적으로 지정하고 나머지는 헬퍼 함수로 추출하는 것입니다. 예를 들어:
private fun createLeenkUsecase( leenkGetService: LeenkGetService = mockk(), userGetService: UserGetService = mockk(), // ... 필요한 서비스만 나열 ): LeenkUsecase = LeenkUsecase( mockk(), mockk(), leenkGetService, // ... )그러나 현재 구조도 작동하며, 이는 LeenkUsecase의 설계 문제를 반영하는 것일 수 있습니다. 추후 리팩토링 시 고려해 주세요.
251-268: 완료된 링크 마감 시도 방지 테스트가 작성되었습니다완료 상태의 링크에 대한 마감 시도를 차단합니다. 다만 Line 265에서
LeenkAlreadyClosedException을 사용하는데, 완료(COMPLETED) 상태와 마감(CLOSED) 상태가 의미상 다르다면 별도의 예외 타입을 사용하는 것이 더 명확할 수 있습니다.현재 구현이 의도된 비즈니스 로직이라면 문제없지만, 향후 예외 메시지나 타입을 통해 두 상태를 명확히 구분하는 것을 고려해 주세요.
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
build.gradlesrc/test/java/leets/leenk/domain/leenk/application/usecase/LeenkUsecaseTest.kt
🔇 Additional comments (11)
build.gradle (2)
49-52: Testcontainers 의존성 구성 적절함Testcontainers 의존성이 올바르게 추가되었습니다. 버전을 명시하지 않아 Spring Boot BOM이 관리하도록 한 것도 좋은 선택입니다.
5-8: 문제 없음 - Kotlin 1.9.25는 Spring Boot 3.5.0 공식 버전입니다Kotlin 1.9.25는 Spring Boot 3.5.0의 공식 기본 버전이므로 호환성 문제가 없습니다. kotlin-spring 플러그인은 Kotlin 클래스가 기본적으로 final이므로 Spring 관리 빈이 프록시될 수 있도록 자동으로 클래스를 열기 위해 필요하며, 테스트 코드를 포함하여 모든 Spring Boot Kotlin 프로젝트의 표준 구성입니다.
src/test/java/leets/leenk/domain/leenk/application/usecase/LeenkUsecaseTest.kt (9)
32-44: 목 선언과 픽스처 구조가 적절합니다MockK를 사용한 목 선언이 올바르게 구성되어 있습니다.
leenkNotificationUsecase에relaxed = true옵션을 사용한 것은 알림 호출 검증만 필요하고 반환값이 중요하지 않은 경우에 적합한 접근입니다.
89-108: 정상 참여 시나리오 테스트가 잘 작성되었습니다테스트가 AAA 패턴을 명확하게 따르고 있으며, 다음 항목들을 적절히 검증합니다:
- 참여자 저장 호출
- 알림 전송 호출
- 현재 참여자 수 증가
110-128: 모집 중이 아닌 링크 예외 처리 테스트가 적절합니다마감된 링크에 참여 시도할 때 적절한 예외가 발생하는지 검증하고, 부수 효과(저장, 알림)가 발생하지 않음을 확인합니다.
130-144: 중복 참여 방지 테스트가 잘 작성되었습니다이미 참여한 사용자의 재참여를 적절히 차단하고, 불필요한 저장 및 알림 호출이 발생하지 않음을 검증합니다.
201-214: 링크 마감 성공 시나리오 테스트가 적절합니다링크 소유자가 모집 중인 링크를 마감할 때 상태 변경과 알림 전송이 올바르게 수행되는지 검증합니다.
216-230: 권한 검증 테스트가 잘 작성되었습니다링크 소유자가 아닌 사용자의 마감 시도를 올바르게 차단하고, 링크 상태가 변경되지 않으며 알림이 전송되지 않음을 검증합니다.
232-249: 이미 마감된 링크 재마감 방지 테스트가 적절합니다이미 마감된 링크를 다시 마감하려는 시도를 올바르게 차단하고, 중복 알림이 전송되지 않음을 검증합니다.
167-195: 마지막 슬롯 참여 경계 테스트가 잘 작성되었습니다마지막 남은 자리에 참여하는 경계 조건을 테스트합니다. 픽스처 구현에서
createAlmostFullLeenk는currentParticipants = maxParticipants - 1로 설정하므로 (기본값: maxParticipants=10L이면 currentParticipants=9L), line 194의 최종 참여자 수 10L 검증이 정확합니다.
146-165: 최대 참여 인원 초과 테스트가 적절합니다최대 참여 인원에 도달한 링크에 대한 참여 시도를 올바르게 차단하고, 부수 효과가 발생하지 않음을 검증합니다.
createFullLeenk픽스처는currentParticipants == maxParticipants상태를 올바르게 생성합니다.
| testImplementation 'org.testcontainers:junit-jupiter' | ||
| testImplementation 'org.testcontainers:mysql' | ||
| testImplementation 'org.testcontainers:mongodb' | ||
| testImplementation "io.mockk:mockk:1.13.10" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MockK 버전 업그레이드 권장
MockK 1.13.10은 인라인 값 클래스 모킹에서 ClassCastException을 발생시키는 알려진 버그를 가지고 있습니다. 최신 버전 1.14.7로 업그레이드하면 이 문제와 1.13.x에서 발견된 여러 버그가 해결되며, Kotlin 1.9.25와의 호환성도 문제없습니다.
🤖 Prompt for AI Agents
In build.gradle around line 53 update MockK dependency version to address a
known ClassCastException when mocking inline value classes: change the
testImplementation entry for "io.mockk:mockk" from 1.13.10 to 1.14.7, then
refresh Gradle dependencies and run the test suite to verify no regressions and
Kotlin 1.9.25 compatibility.
Related issue 🛠
작업 내용 💻
participateLeenk,closeLeenk,finishLeenk,kickParticipant,leaveLeenk)participateLeenk(5개 케이스) - 정상 참여, 모집 중이 아닌 링크 참여, 중복 참여, 최대 인원 초과, 경계값 테스트closeLeenk(4개 케이스) - 정상 마감, 권한 없음, 이미 마감됨, 완료된 링크 마감 시도finishLeenk(4개 케이스) - 정상 완료, 권한 없음, 모집 중인 링크, 이미 완료됨kickParticipant(6개 케이스) - 정상 강퇴, 권한 없음, 자기 자신 강퇴, 참여하지 않은 사용자, 마감된 링크, 완료된 링크leaveLeenk(6개 케이스) - 정상 나가기, 호스트 나가기, 참여하지 않은 사용자, 마감된 링크, 완료된 링크, 경계값 테스트스크린샷 📷
같이 얘기해보고 싶은 내용이 있다면 작성 📢
Summary by CodeRabbit
릴리스 노트
Tests
Chores
✏️ Tip: You can customize this high-level summary in your review settings.