Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
935c887
feat(config): restructure application configuration files and add new…
polyglot-k Aug 23, 2025
df0a1e7
feat(application): add static factory method for ApplicationContext a…
polyglot-k Aug 23, 2025
0a1cf8d
feat(tests): add unit tests for GetApplicationsStepProcessor
polyglot-k Aug 23, 2025
24b5758
feat(tests): add unit tests for Refund processing components
polyglot-k Aug 23, 2025
727d61f
refactor(tests): remove unnecessary blank line in GetApplicationsStep…
polyglot-k Aug 23, 2025
0b8846c
feat(tests): add unit tests for IdStream functionality
polyglot-k Aug 23, 2025
c15eeab
feat(ci): update GitHub Actions workflow to separate build and test jobs
polyglot-k Aug 23, 2025
a750e71
feat(tests): add unit tests for ApplicationValidator functionality
polyglot-k Aug 23, 2025
5cff4f7
Merge branch 'develop' of https://github.com/mosu-dev/mosu-server int…
polyglot-k Aug 23, 2025
3403f48
feat(tests): add unit tests for Inquiry services and repositories
jbh010204 Aug 23, 2025
3776e5e
feat(tests): add unit tests for Payment services and repositories
jbh010204 Aug 23, 2025
a8a66fa
feat(tests): add unit tests for FaqService
jbh010204 Aug 23, 2025
16e53be
feat(tests): add unit tests for various services and configurations
jbh010204 Aug 23, 2025
55d9a0b
feat(tests): add unit tests for ApplicationValidator functionality
polyglot-k Aug 23, 2025
ec94654
fix : 백업 폴더 제거
polyglot-k Aug 23, 2025
6ed7a8f
feat(ci): update GitHub Actions workflow to combine build and test jobs
polyglot-k Aug 23, 2025
e9c91e0
fix: correct package name from 'vaildator' to 'validator' in Applicat…
polyglot-k Aug 23, 2025
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
13 changes: 11 additions & 2 deletions .github/workflows/docker-pr-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [ develop ]

jobs:
build-and-deploy:
build-and-test:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -34,5 +34,14 @@ jobs:
git clone https://x-access-token:${{ secrets.GH_PAT }}@github.com/mosu-dev/mosu-kmc-jar.git temp-jar
cp temp-jar/*.jar libs/

- name: Build with Gradle
- name: Build without tests
run: ./gradlew build -x test

- name: Run tests
run: ./gradlew test

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: build/libs/*.jar
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import java.util.Set;
import java.util.function.Function;
import java.util.stream.Collectors;

import life.mosu.mosuserver.domain.application.entity.ApplicationJpaEntity;
import life.mosu.mosuserver.domain.exam.entity.ExamJpaEntity;
import life.mosu.mosuserver.domain.examapplication.entity.ExamApplicationJpaEntity;
Expand All @@ -34,6 +33,13 @@ public ApplicationContext(
this(applications, examApplications, Map.of(), Map.of(), Map.of(), Map.of());
}

public static ApplicationContext of(
List<ApplicationJpaEntity> applications,
List<ExamApplicationWithStatus> examApplications
) {
return new ApplicationContext(applications, examApplications);
}

public ApplicationContext fetchExams(Function<List<Long>, List<ExamJpaEntity>> fetcher) {
Map<Long, ExamJpaEntity> newExamMap = fetcher.apply(
examApplications.stream()
Expand All @@ -42,37 +48,44 @@ public ApplicationContext fetchExams(Function<List<Long>, List<ExamJpaEntity>> f
.toList()
).stream().collect(Collectors.toMap(ExamJpaEntity::getId, Function.identity()));

return new ApplicationContext(applications, examApplications, newExamMap, subjectMap, paymentMap, refundMap);
return new ApplicationContext(applications, examApplications, newExamMap, subjectMap,
paymentMap, refundMap);
}

public ApplicationContext fetchSubjects(Function<List<Long>, List<ExamSubjectJpaEntity>> fetcher) {
public ApplicationContext fetchSubjects(
Function<List<Long>, List<ExamSubjectJpaEntity>> fetcher) {
Map<Long, List<ExamSubjectJpaEntity>> newSubjectMap = fetcher.apply(
examApplications.stream()
.map(e -> e.examApplication().getId())
.toList()
).stream().collect(Collectors.groupingBy(ExamSubjectJpaEntity::getExamApplicationId));

return new ApplicationContext(applications, examApplications, examMap, newSubjectMap, paymentMap, refundMap);
return new ApplicationContext(applications, examApplications, examMap, newSubjectMap,
paymentMap, refundMap);
}

public ApplicationContext fetchPayments(Function<List<Long>, List<PaymentJpaEntity>> fetcher) {
Map<Long, PaymentJpaEntity> newPaymentMap = fetcher.apply(
examApplications.stream()
.map(e -> e.examApplication().getId())
.toList()
).stream().collect(Collectors.toMap(PaymentJpaEntity::getExamApplicationId, Function.identity()));
).stream().collect(
Collectors.toMap(PaymentJpaEntity::getExamApplicationId, Function.identity()));

return new ApplicationContext(applications, examApplications, examMap, subjectMap, newPaymentMap, refundMap);
return new ApplicationContext(applications, examApplications, examMap, subjectMap,
newPaymentMap, refundMap);
}

public ApplicationContext fetchRefunds(Function<List<Long>, List<RefundJpaEntity>> fetcher) {
Map<Long, RefundJpaEntity> newRefundMap = fetcher.apply(
examApplications.stream()
.map(e -> e.examApplication().getId())
.toList()
).stream().collect(Collectors.toMap(RefundJpaEntity::getExamApplicationId, Function.identity()));
).stream().collect(
Collectors.toMap(RefundJpaEntity::getExamApplicationId, Function.identity()));

return new ApplicationContext(applications, examApplications, examMap, subjectMap, paymentMap, newRefundMap);
return new ApplicationContext(applications, examApplications, examMap, subjectMap,
paymentMap, newRefundMap);
}

public List<ApplicationResponse> assemble() {
Expand All @@ -88,10 +101,13 @@ public List<ApplicationResponse> assemble() {
.toList();
}

private Map.Entry<Long, ExamApplicationResponse> createExamApplicationResponse(ExamApplicationWithStatus item) {
private Map.Entry<Long, ExamApplicationResponse> createExamApplicationResponse(
ExamApplicationWithStatus item) {
ExamApplicationJpaEntity examApp = item.examApplication();
ExamJpaEntity exam = examMap.get(examApp.getExamId());
if (exam == null) return null;
if (exam == null) {
return null;
}

Set<String> subjects = subjectMap.getOrDefault(examApp.getId(), List.of()).stream()
.map(s -> s.getSubject().getSubjectName()).collect(Collectors.toSet());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import life.mosu.mosuserver.application.application.processor.GetApplicationsStepProcessor;
import life.mosu.mosuserver.application.application.processor.RegisterApplicationStepProcessor;
import life.mosu.mosuserver.application.application.processor.SaveExamTicketStepProcessor;
import life.mosu.mosuserver.application.application.vaildator.ApplicationValidator;
import life.mosu.mosuserver.application.application.validator.ApplicationValidator;
import life.mosu.mosuserver.application.exam.cache.ExamQuotaCacheManager;
import life.mosu.mosuserver.application.user.UserService;
import life.mosu.mosuserver.domain.application.entity.ApplicationJpaEntity;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package life.mosu.mosuserver.application.application.vaildator;
package life.mosu.mosuserver.application.application.validator;

import java.time.LocalDateTime;
import java.util.HashSet;
Expand Down

This file was deleted.

57 changes: 0 additions & 57 deletions src/test/java/life/mosu/mosuserver/FaqServiceTest.java

This file was deleted.

12 changes: 0 additions & 12 deletions src/test/java/life/mosu/mosuserver/MosuServerApplicationTests.java

This file was deleted.

Loading
Loading