Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
85f74aa
test: findTopDepartmentsByFormId 쿼리 검증
Seooooo24 Jan 1, 2026
93e9c88
test: findRecentFormByDateWithApplicationCount 쿼리 검증
Seooooo24 Jan 1, 2026
ca655d6
test: findAllFinalPassedByFormId 쿼리 검증
Seooooo24 Jan 1, 2026
b9be5b0
test: fixtureMonkey 의존성 제거
Seooooo24 Jan 1, 2026
6d96736
refactor: 픽스처 클래스 사용하도록 변경
Seooooo24 Jan 2, 2026
f0ba4fa
fix: 오타 수정
Seooooo24 Jan 2, 2026
0e57b03
test: FormAnswerFixture, FormFieldFixture 생성
Seooooo24 Jan 3, 2026
26f9ec9
refactor: FileMetaDataFixture 메소드 추가
Seooooo24 Jan 3, 2026
f702988
refactor: FormApplicationFixture 메서드 이름 변경 및 추가
Seooooo24 Jan 3, 2026
f7ca2ac
test: FormApplication 도메인 리포지토리 테스트
Seooooo24 Jan 3, 2026
914f992
refactor: 리뷰 반영하여 수정
Seooooo24 Jan 4, 2026
5737d35
refactor: 리뷰 반영하여 수정
Seooooo24 Jan 4, 2026
5245cf3
refactor: 리뷰 반영하여 수정
Seooooo24 Jan 4, 2026
8baaca4
refactor: 리뷰 반영하여 수정
Seooooo24 Jan 4, 2026
51d7797
refactor: 리뷰 반영하여 수정
Seooooo24 Jan 4, 2026
eb695ec
refactor: 리뷰 반영하여 수정
Seooooo24 Jan 5, 2026
cd6ffd2
git merge
Seooooo24 Jan 5, 2026
5b06b6a
refactor: CI 테스트 실패로 인한 쿼리 수정
Seooooo24 Jan 5, 2026
00d4d0c
refactor: CI 테스트 실패로 인한 테스트 수정
Seooooo24 Jan 5, 2026
a7d669a
refactor: CI 테스트 실패로 인한 테스트 수정
Seooooo24 Jan 5, 2026
b1c4f13
refactor: CI 테스트 실패로 인한 테스트 수정
Seooooo24 Jan 5, 2026
f1419f4
refactor: CI 테스트 실패로 인한 테스트 수정
Seooooo24 Jan 6, 2026
17d7241
refactor: CI 테스트 실패로 인한 테스트 수정
Seooooo24 Jan 6, 2026
48307f7
refactor: CI 테스트 실패로 인한 테스트 수정
Seooooo24 Jan 6, 2026
fca04f0
refactor: CI 테스트 실패로 인한 테스트 수정
Seooooo24 Jan 6, 2026
92ff917
refactor: CI 테스트 실패로 인한 테스트 수정
Seooooo24 Jan 6, 2026
e611ac1
refactor: CI 테스트 실패로 인한 테스트 수정
Seooooo24 Jan 6, 2026
fd09765
refactor: CI 테스트 실패로 인한 테스트 수정
Seooooo24 Jan 6, 2026
05f71b0
refactor: CI 테스트 실패로 인한 테스트 수정
Seooooo24 Jan 6, 2026
4a2b242
refactor: CI 테스트 실패로 인한 테스트 수정
Seooooo24 Jan 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
jobs:
build_and_push:
runs-on: ubuntu-latest
env:
TZ: Asia/Seoul
steps:
- name: Check Out Repository
uses: actions/checkout@v4
Expand All @@ -33,4 +35,4 @@ jobs:
run: chmod +x gradlew

- name: CI Test
run: ./gradlew clean build
run: ./gradlew clean test -Duser.timezone=Asia/Seoul
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,24 @@

public class FileMetaDataFixture {

public static FileMetaData createFormFileMetaData(UUID id, Long entityId) {
public static FileMetaData create(UUID id, Long entityId, DomainType domainType) {
return FileMetaData.builder()
.id(id)
.fileKey("1")
.fileStatus(FileStatus.COUPLED)
.fileName("파일")
.domainType(DomainType.FORM_FILE)
.domainType(domainType)
.entityId(entityId)
.build();
}

public static FileMetaData create(UUID id, Long entityId, DomainType domainType, String filename) {
return FileMetaData.builder()
.id(id)
.fileKey("1")
.fileStatus(FileStatus.COUPLED)
.fileName(filename)
.domainType(domainType)
.entityId(entityId)
.build();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package ddingdong.ddingdongBE.common.fixture;

import ddingdong.ddingdongBE.domain.form.entity.FormField;
import ddingdong.ddingdongBE.domain.formapplication.entity.FormAnswer;
import ddingdong.ddingdongBE.domain.formapplication.entity.FormApplication;
import java.util.List;

public class FormAnswerFixture {

public static FormAnswer create(FormApplication formApplication, FormField formField) {
return FormAnswer.builder()
.formApplication(formApplication)
.formField(formField)
.value(List.of("답변"))
.build();
}

public static FormAnswer create(FormApplication formApplication, FormField formField, List<String> value) {
return FormAnswer.builder()
.formApplication(formApplication)
.formField(formField)
.value(value)
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,24 @@

public class FormApplicationFixture {

public static FormApplication create(String name, Form form) {
public static FormApplication create(Form form) {
return FormApplication.builder()
.name("이름")
.studentNumber("20231234")
.department("학과")
.phoneNumber("010-1234-5678")
.email("[email protected]")
.status(FormApplicationStatus.SUBMITTED)
.form(form)
.deletedAt(null)
.build();
}

public static FormApplication create(Form form, String name, String department) {
return FormApplication.builder()
.name(name)
.studentNumber("20231234")
.department("컴퓨터공학과")
.department(department)
.phoneNumber("010-1234-5678")
.email("[email protected]")
.status(FormApplicationStatus.SUBMITTED) // 예시 상태, 필요에 따라 바꿔도 됨
Expand All @@ -19,6 +32,19 @@ public static FormApplication create(String name, Form form) {
.build();
}

public static FormApplication create(Form form, FormApplicationStatus status) {
return FormApplication.builder()
.name("이름")
.studentNumber("20231234")
.department("학과")
.phoneNumber("010-1234-5678")
.email("[email protected]")
.status(status)
.form(form)
.deletedAt(null)
.build();
}

public static FormApplication pendingFormApplication() {
return FormApplication.builder()
.name("이름")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package ddingdong.ddingdongBE.common.fixture;

import ddingdong.ddingdongBE.domain.form.entity.FieldType;
import ddingdong.ddingdongBE.domain.form.entity.Form;
import ddingdong.ddingdongBE.domain.form.entity.FormField;
import java.util.List;

public class FormFieldFixture {

public static FormField create(Form form) {
return FormField.builder()
.section("섹션")
.fieldType(FieldType.RADIO)
.form(form)
.question("질문")
.options(List.of("선택지"))
.required(false)
.fieldOrder(1)
.build();
}

public static FormField create(Form form, String question) {
return FormField.builder()
.section("섹션")
.fieldType(FieldType.RADIO)
.form(form)
.question(question)
.options(List.of("선택지"))
.required(false)
.fieldOrder(1)
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ public static Form createForm(Club club) {
.build();
}

public static Form createForm(Club club, LocalDate startDate, LocalDate endDate) {
return Form.builder()
.title("모집 지원서")
.description("동아리 모집을 위한 지원서입니다.")
.startDate(startDate)
.endDate(endDate)
.hasInterview(true)
.sections(List.of("자기소개", "지원 동기", "경력 및 경험"))
.club(club)
.build();
}
Comment on lines +27 to +37
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion | 🟠 Major

중복된 메서드를 제거하세요.

createForm(Club, LocalDate, LocalDate) (27-37번 줄)과 createFormWithStartAndEndDate(Club, LocalDate, LocalDate) (81-91번 줄)는 메서드 이름만 다를 뿐 완전히 동일한 구현을 가지고 있습니다. 둘 중 하나를 제거하여 코드 중복을 해소하세요.

🔎 수정 제안

createFormWithStartAndEndDate 메서드를 제거하고 createForm(Club, LocalDate, LocalDate)만 사용하도록 통일하세요:

-    public static Form createFormWithStartAndEndDate(Club club, LocalDate startDate, LocalDate endDate) {
-        return Form.builder()
-                .title("모집 지원서")
-                .description("동아리 모집을 위한 지원서입니다.")
-                .startDate(startDate)
-                .endDate(endDate)
-                .hasInterview(true)
-                .sections(List.of("자기소개", "지원 동기", "경력 및 경험"))
-                .club(club)
-                .build();
-    }

Also applies to: 81-91

🤖 Prompt for AI Agents
In @src/test/java/ddingdong/ddingdongBE/common/fixture/FormFixture.java around
lines 27-37, There are two identical factory methods, createForm(Club,
LocalDate, LocalDate) and createFormWithStartAndEndDate(Club, LocalDate,
LocalDate); remove the duplicate createFormWithStartAndEndDate, keep createForm
as the single implementation, and update any callers/tests that reference
createFormWithStartAndEndDate to call createForm instead so compilation and
behavior remain unchanged.


public static Form formWithClubNull() {
return Form.builder()
.title("모집 지원서")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import ddingdong.ddingdongBE.domain.user.repository.UserRepository;
import jakarta.persistence.EntityManager;
import java.sql.Timestamp;
import java.time.LocalDateTime;
import java.util.Optional;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
Expand Down
Loading