Skip to content

Commit

Permalink
Rename: ~DtoForAdd에서 이름 ~ForAddDto로 파일명 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
hee9841 committed Oct 14, 2024
1 parent 36f55f8 commit 2217d1f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package com.dnd.runus.presentation.v1.running.dto;

import com.dnd.runus.domain.common.Pace;
import io.swagger.v3.oas.annotations.media.Schema;
import java.time.Duration;

public record RunningRecordMetricsDtoForAdd(
public record RunningRecordMetricsForAddDto(
@Schema(description = "멈춘 시간을 제외한 실제로 달린 시간", example = "123:45:56", format = "HH:mm:ss")
Duration runningTime,
@Schema(description = "달린 거리(m)", example = "1000")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import com.dnd.runus.global.constant.RunningEmoji;
import com.dnd.runus.global.exception.BusinessException;
import com.dnd.runus.global.exception.type.ErrorType;
import com.dnd.runus.presentation.v1.running.dto.RunningRecordMetricsDtoForAdd;
import com.dnd.runus.presentation.v1.running.dto.RunningRecordMetricsForAddDto;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
Expand Down Expand Up @@ -34,7 +34,7 @@ public record RunningRecordRequest(
@Schema(description = "목표 달성 모드, normal: 목표 설정X, challenge: 챌린지, goal: 개인 목표")
RunningAchievementMode achievementMode,
@NotNull
RunningRecordMetricsDtoForAdd runningData
RunningRecordMetricsForAddDto runningData
) {
public RunningRecordRequest {
if (startAt.isAfter(endAt)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import com.dnd.runus.global.constant.MemberRole;
import com.dnd.runus.global.constant.RunningEmoji;
import com.dnd.runus.global.exception.NotFoundException;
import com.dnd.runus.presentation.v1.running.dto.RunningRecordMetricsDtoForAdd;
import com.dnd.runus.presentation.v1.running.dto.RunningRecordMetricsForAddDto;
import com.dnd.runus.presentation.v1.running.dto.request.RunningAchievementMode;
import com.dnd.runus.presentation.v1.running.dto.request.RunningRecordRequest;
import com.dnd.runus.presentation.v1.running.dto.request.RunningRecordWeeklySummaryType;
Expand Down Expand Up @@ -211,7 +211,7 @@ void addRunningRecord_challenge() {
null,
null,
RunningAchievementMode.CHALLENGE,
new RunningRecordMetricsDtoForAdd(Duration.ofSeconds(10_100), 10_000, 500.0));
new RunningRecordMetricsForAddDto(Duration.ofSeconds(10_100), 10_000, 500.0));

Member member = new Member(MemberRole.USER, "nickname1");
RunningRecord expected = createRunningRecord(request, member);
Expand Down Expand Up @@ -251,7 +251,7 @@ void addRunningRecord_goal_time_success() {
null,
1200,
RunningAchievementMode.GOAL,
new RunningRecordMetricsDtoForAdd(Duration.ofSeconds(10_100), 10_000, 500.0));
new RunningRecordMetricsForAddDto(Duration.ofSeconds(10_100), 10_000, 500.0));

Member member = new Member(MemberRole.USER, "nickname1");
RunningRecord expected = createRunningRecord(request, member);
Expand Down Expand Up @@ -290,7 +290,7 @@ void addRunningRecord_goal_time_fail() {
null,
20_000,
RunningAchievementMode.GOAL,
new RunningRecordMetricsDtoForAdd(Duration.ofSeconds(10_100), 10_000, 500.0));
new RunningRecordMetricsForAddDto(Duration.ofSeconds(10_100), 10_000, 500.0));

Member member = new Member(MemberRole.USER, "nickname1");
RunningRecord expected = createRunningRecord(request, member);
Expand Down Expand Up @@ -329,7 +329,7 @@ void addRunningRecord_goal_distance() {
5_000,
null,
RunningAchievementMode.GOAL,
new RunningRecordMetricsDtoForAdd(Duration.ofSeconds(10_100), 10_000, 500.0));
new RunningRecordMetricsForAddDto(Duration.ofSeconds(10_100), 10_000, 500.0));

Member member = new Member(MemberRole.USER, "nickname1");
RunningRecord expected = createRunningRecord(request, member);
Expand Down Expand Up @@ -368,7 +368,7 @@ void addRunningRecord_goal_distance_same_value() {
10_000,
null,
RunningAchievementMode.GOAL,
new RunningRecordMetricsDtoForAdd(Duration.ofSeconds(10_100), 10_000, 500.0));
new RunningRecordMetricsForAddDto(Duration.ofSeconds(10_100), 10_000, 500.0));

Member member = new Member(MemberRole.USER, "nickname1");
RunningRecord expected = createRunningRecord(request, member);
Expand Down Expand Up @@ -406,7 +406,7 @@ void addRunningRecord_check_cal_pace() {
null,
null,
RunningAchievementMode.NORMAL,
new RunningRecordMetricsDtoForAdd(Duration.ofSeconds(1_668), 3_280, 500.0));
new RunningRecordMetricsForAddDto(Duration.ofSeconds(1_668), 3_280, 500.0));

Member member = new Member(MemberRole.USER, "nickname1");
RunningRecord expected = createRunningRecord(request, member);
Expand Down Expand Up @@ -526,7 +526,7 @@ void getWeeklySummary_Duration() {

private RunningRecord createRunningRecord(RunningRecordRequest request, Member member) {

RunningRecordMetricsDtoForAdd runningData = request.runningData();
RunningRecordMetricsForAddDto runningData = request.runningData();

double calPace = (double) runningData.runningTime().toSeconds()
/ runningData.distanceMeter()
Expand Down

0 comments on commit 2217d1f

Please sign in to comment.