Skip to content

Commit 6a7dea0

Browse files
committed
chore: sonar qube 이슈 수정
1 parent 5284816 commit 6a7dea0

File tree

4 files changed

+9
-13
lines changed

4 files changed

+9
-13
lines changed

src/main/java/com/somemore/volunteer/usecase/VolunteerQueryUseCase.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import com.somemore.volunteer.domain.Volunteer;
44
import com.somemore.volunteer.dto.response.VolunteerProfileResponseDto;
55
import com.somemore.volunteer.dto.response.VolunteerRankingResponseDto;
6-
import com.somemore.volunteer.dto.response.VolunteerSimpleInfoResponseDto;
76
import com.somemore.volunteer.repository.mapper.VolunteerSimpleInfo;
87
import java.util.List;
98
import java.util.UUID;

src/test/java/com/somemore/volunteer/repository/VolunteerRepositoryTest.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,6 @@ void findRankingByVolunteerHours_lessThan4Volunteers() {
134134
rankings.get(1).totalVolunteerHours());
135135
}
136136

137-
private void createVolunteerAndUpdateVolunteerStats(int i) {
138-
Volunteer newVolunteer = Volunteer.createDefault(NAVER, "oauth-id-" + i);
139-
newVolunteer.updateVolunteerStats(i * 10, i);
140-
volunteerRepository.save(newVolunteer);
141-
}
142-
143137
@DisplayName("아이디 리스트로 봉사자를 조회할 수있다.")
144138
@Test
145139
void findAllByIds() {
@@ -172,11 +166,11 @@ void findSimpleInfoByIds() {
172166
List<UUID> ids = new ArrayList<>();
173167

174168
for (int i = 0; i < 4; i++) {
175-
Volunteer volunteer = volunteerRepository.save(Volunteer.createDefault(NAVER, "naver"));
169+
Volunteer volunteerTest = volunteerRepository.save(Volunteer.createDefault(NAVER, "naver"));
176170
String name = "name" + i;
177171
VolunteerRegisterRequestDto dto = createVolunteerRegisterRequestDto(name);
178-
volunteerDetailRepository.save(VolunteerDetail.of(dto, volunteer.getId()));
179-
ids.add(volunteer.getId());
172+
volunteerDetailRepository.save(VolunteerDetail.of(dto, volunteerTest.getId()));
173+
ids.add(volunteerTest.getId());
180174
}
181175

182176
// when
@@ -186,11 +180,16 @@ void findSimpleInfoByIds() {
186180
assertThat(simpleInfo).hasSize(4);
187181
}
188182

183+
private void createVolunteerAndUpdateVolunteerStats(int i) {
184+
Volunteer newVolunteer = Volunteer.createDefault(NAVER, "oauth-id-" + i);
185+
newVolunteer.updateVolunteerStats(i * 10, i);
186+
volunteerRepository.save(newVolunteer);
187+
}
188+
189189
private static VolunteerRegisterRequestDto createVolunteerRegisterRequestDto(String name) {
190190
return new VolunteerRegisterRequestDto(
191191
NAVER, "naver", name, "email", "M", "1111", "1111",
192192
"010-0000-0000");
193193
}
194194

195-
196195
}

src/test/java/com/somemore/volunteer/service/VolunteerQueryServiceTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
import com.somemore.volunteer.dto.request.VolunteerRegisterRequestDto;
1515
import com.somemore.volunteer.dto.response.VolunteerProfileResponseDto;
1616
import com.somemore.volunteer.dto.response.VolunteerRankingResponseDto;
17-
import com.somemore.volunteer.dto.response.VolunteerSimpleInfoResponseDto;
1817
import com.somemore.volunteer.repository.VolunteerDetailRepository;
1918
import com.somemore.volunteer.repository.VolunteerRepository;
2019
import com.somemore.volunteer.repository.mapper.VolunteerSimpleInfo;

src/test/java/com/somemore/volunteerapply/service/VolunteerApplyQueryServiceTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
import com.somemore.volunteerapply.domain.VolunteerApply;
1111
import com.somemore.volunteerapply.dto.response.VolunteerApplyResponseDto;
1212
import com.somemore.volunteerapply.dto.response.VolunteerApplySummaryResponseDto;
13-
import com.somemore.volunteerapply.repository.VolunteerApplyJpaRepository;
1413
import com.somemore.volunteerapply.repository.VolunteerApplyRepository;
1514
import java.util.List;
1615
import java.util.UUID;

0 commit comments

Comments
 (0)