Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.swyp.picke.domain.ad.link;

import com.swyp.picke.domain.ad.entity.AdCreative;
import org.springframework.web.util.UriComponentsBuilder;

/**
Expand All @@ -24,7 +25,7 @@ static String merge(String landingUrl, String paramName, String value) {
}

/** 지면별 성과를 가르기 위한 추적값. 영문·숫자·밑줄만 쓰므로 인코딩이 필요 없다. */
static String subIdOf(com.swyp.picke.domain.ad.entity.AdCreative creative) {
static String subIdOf(AdCreative creative) {
return creative.getSlot().name() + "_" + creative.getCode();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.swyp.picke.domain.battle.parser.EmotionClassifier.ScriptLine;
import com.swyp.picke.domain.battle.parser.ScriptToneExtractor;
import com.swyp.picke.domain.scenario.enums.SpeakerType;
import com.swyp.picke.domain.scenario.enums.ScenarioStatus;
import com.swyp.picke.domain.scenario.enums.Tone;
import com.swyp.picke.domain.scenario.service.PhilosopherVoiceService;
import com.swyp.picke.domain.tag.entity.Tag;
Expand Down Expand Up @@ -109,7 +110,7 @@ public AdminBattleParseResponse parse(String rawText) {
Map<SpeakerType, String> voiceSettings = buildVoiceSettings(binding, warnings);

AdminScenarioCreateRequest scenarioPayload = new AdminScenarioCreateRequest(
null, doc.interactive, com.swyp.picke.domain.scenario.enums.ScenarioStatus.PENDING,
null, doc.interactive, ScenarioStatus.PENDING,
nodes, voiceSettings);

Map<String, String> speakerNames = new LinkedHashMap<>();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.swyp.picke.global.config;

import com.swyp.picke.domain.user.service.batch.CreditWeeklyBatchScheduler;
import java.time.Clock;
import java.time.ZoneId;
import org.springframework.context.annotation.Bean;
Expand All @@ -9,7 +10,7 @@

/**
* 스케줄링 활성화.
* 크레딧 주간 배치({@link com.swyp.picke.domain.user.service.batch.CreditWeeklyBatchScheduler})의 {@code @Scheduled} 어노테이션이 동작하려면 필요.
* 크레딧 주간 배치({@link CreditWeeklyBatchScheduler})의 {@code @Scheduled} 어노테이션이 동작하려면 필요.
*/
@Configuration
@EnableScheduling
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import com.swyp.picke.domain.battle.parser.EmotionClassifier;
import com.swyp.picke.domain.battle.parser.ScriptToneExtractor;
import com.swyp.picke.domain.scenario.enums.SpeakerType;
import com.swyp.picke.domain.scenario.enums.Tone;
import com.swyp.picke.domain.scenario.service.PhilosopherVoiceService;
import com.swyp.picke.domain.tag.entity.Tag;
import com.swyp.picke.domain.tag.enums.TagType;
Expand Down Expand Up @@ -288,9 +289,9 @@ private AdminScenarioNodeRequest node(AdminBattleParseResponse res, String name)
void LLM_실패시_톤은_전부_NEUTRAL이고_경고를_남긴다() throws IOException {
AdminBattleParseResponse res = service.parse(load("sample-interactive.txt"));

List<com.swyp.picke.domain.scenario.enums.Tone> tones = new ArrayList<>();
List<Tone> tones = new ArrayList<>();
res.scenarioPayload().nodes().forEach(n -> n.scripts().forEach(s -> tones.add(s.tone())));
assertThat(tones).containsOnly(com.swyp.picke.domain.scenario.enums.Tone.NEUTRAL);
assertThat(tones).containsOnly(Tone.NEUTRAL);
assertThat(res.warnings()).anyMatch(w -> w.code().equals("LLM_CLASSIFY_FAILED"));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import com.swyp.picke.domain.user.enums.UserStatus;
import com.swyp.picke.domain.user.repository.CreditHistoryRepository;
import com.swyp.picke.domain.user.repository.UserRepository;
import com.swyp.picke.domain.notification.service.NotificationService;
import com.swyp.picke.domain.battle.repository.BattleRepository;
import com.swyp.picke.global.common.exception.CustomException;
import com.swyp.picke.global.common.exception.ErrorCode;
import org.junit.jupiter.api.DisplayName;
Expand Down Expand Up @@ -42,10 +44,10 @@ class CreditServiceTest {
private UserService userService;

@Mock
private com.swyp.picke.domain.notification.service.NotificationService notificationService;
private NotificationService notificationService;

@Mock
private com.swyp.picke.domain.battle.repository.BattleRepository battleRepository;
private BattleRepository battleRepository;

@InjectMocks
private CreditService creditService;
Expand Down
Loading