use of wooteco.prolog.session.application.dto.MissionRequest in project prolog by woowacourse.
the class MissionServiceTest method createTest.
@DisplayName("Mission을 생성한다.")
@Test
void createTest() {
// given
MissionRequest request = new MissionRequest("세션1 - 자동차 경주 미션", session1.getId());
// when
MissionResponse response = missionService.create(request);
// then
assertThat(response.getName()).isEqualTo(request.getName());
assertThat(response.getSession().getId()).isEqualTo(request.getSessionId());
}
use of wooteco.prolog.session.application.dto.MissionRequest in project prolog by woowacourse.
the class MissionServiceTest method findByIdTest.
@DisplayName("ID를 통해서 Mission을 조회한다.")
@Test
void findByIdTest() {
// given
MissionRequest request = new MissionRequest("세션1 - 자동차 경주 미션", session1.getId());
MissionResponse savedMission = missionService.create(request);
// when
Mission foundMission = missionService.findById(savedMission.getId());
// then
assertThat(foundMission).usingRecursiveComparison().isEqualTo(savedMission);
}
use of wooteco.prolog.session.application.dto.MissionRequest in project prolog by woowacourse.
the class MissionServiceTest method findAllTest.
@DisplayName("모든 MissionResponse를 조회한다.")
@Test
void findAllTest() {
// given
MissionResponse mission1 = missionService.create(new MissionRequest("세션1 - 자동차 경주 미션", session1.getId()));
MissionResponse mission2 = missionService.create(new MissionRequest("세션2 - 로또 미션", session2.getId()));
MissionResponse mission3 = missionService.create(new MissionRequest("세션3 - 블랙잭 미션", session3.getId()));
// when
List<MissionResponse> responses = missionService.findAll();
// then
assertThat(responses.size()).isEqualTo(3);
}
use of wooteco.prolog.session.application.dto.MissionRequest in project prolog by woowacourse.
the class StudylogTagServiceTest method setUp.
@BeforeEach
void setUp() {
SessionResponse session = sessionService.create(new SessionRequest("세션1"));
MissionResponse mission = missionService.create(new MissionRequest("미션 이름", session.getId()));
this.member = memberService.findOrCreateMember(new GithubProfileResponse("이름", "별명", "1", "image"));
}
use of wooteco.prolog.session.application.dto.MissionRequest in project prolog by woowacourse.
the class StudylogTagServiceTest method setUp.
@BeforeEach
void setUp() {
SessionResponse session = sessionService.create(new SessionRequest("세션1"));
MissionResponse mission = missionService.create(new MissionRequest("미션 이름", session.getId()));
this.member = memberService.findOrCreateMember(new GithubProfileResponse("이름", "별명", "1", "image"));
}
Aggregations