Skip to content

Commit

Permalink
Style: 메서드 이름 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
jzakka committed Feb 10, 2024
1 parent 8d106bf commit 3155b96
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/stoury/repository/RankingRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private String getFeedJsonString(SimpleFeedResponse simpleFeed) {
return simpleFeedJson;
}

public List<SimpleFeedResponse> getRankedFeedIds(HotFeedsKeys key) {
public List<SimpleFeedResponse> getRankedFeeds(HotFeedsKeys key) {
Set<String> rankedSimpleFeeds = opsForZset.reverseRange(key.name(), 0, 9);
if (rankedSimpleFeeds == null) {
return Collections.emptyList();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/stoury/service/RankingService.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class RankingService {
private final RankingRepository rankingRepository;

public List<SimpleFeedResponse> getHotFeeds(ChronoUnit chronoUnit) {
return rankingRepository.getRankedFeedIds(getHotFeedsKey(chronoUnit))
return rankingRepository.getRankedFeeds(getHotFeedsKey(chronoUnit))
.stream()
.toList();
}
Expand Down
8 changes: 4 additions & 4 deletions src/test/groovy/com/stoury/IntegrationTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class IntegrationTest extends Specification {
expect:
def jobExecution = jobLauncherTestUtils.launchJob()
"COMPLETED" == jobExecution.getExitStatus().getExitCode()
!rankingRepository.getRankedFeedIds(DAILY_HOT_FEEDS).isEmpty()
!rankingRepository.getRankedFeeds(DAILY_HOT_FEEDS).isEmpty()
}

def "주간 인기 피드 업데이트 테스트"() {
Expand All @@ -128,7 +128,7 @@ class IntegrationTest extends Specification {
expect:
def jobExecution = jobLauncherTestUtils.launchJob()
"COMPLETED" == jobExecution.getExitStatus().getExitCode()
!rankingRepository.getRankedFeedIds(WEEKLY_HOT_FEEDS).isEmpty()
!rankingRepository.getRankedFeeds(WEEKLY_HOT_FEEDS).isEmpty()
}

def "월간 인기 피드 업데이트 테스트"() {
Expand All @@ -147,7 +147,7 @@ class IntegrationTest extends Specification {
expect:
def jobExecution = jobLauncherTestUtils.launchJob()
"COMPLETED" == jobExecution.getExitStatus().getExitCode()
!rankingRepository.getRankedFeedIds(MONTHLY_HOT_FEEDS).isEmpty()
!rankingRepository.getRankedFeeds(MONTHLY_HOT_FEEDS).isEmpty()
}

def "해외에서 10개 인기 여행장소"() {
Expand Down Expand Up @@ -321,7 +321,7 @@ class IntegrationTest extends Specification {
ChronoUnit.DAYS))

then:
def rankedList = rankingRepository.getRankedFeedIds(getHotFeedsKey(ChronoUnit.DAYS)).stream()
def rankedList = rankingRepository.getRankedFeeds(getHotFeedsKey(ChronoUnit.DAYS)).stream()
.map(SimpleFeedResponse::id).toList()
List<Long> expectedList = List.of(
15L, 5L, 14L, 3L, 12L,
Expand Down

0 comments on commit 3155b96

Please sign in to comment.