Search in sources :

Example 1 with SessionResponse

use of wooteco.prolog.session.application.dto.SessionResponse 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"));
}
Also used : MissionRequest(wooteco.prolog.session.application.dto.MissionRequest) GithubProfileResponse(wooteco.prolog.login.application.dto.GithubProfileResponse) MissionResponse(wooteco.prolog.session.application.dto.MissionResponse) SessionResponse(wooteco.prolog.session.application.dto.SessionResponse) SessionRequest(wooteco.prolog.session.application.dto.SessionRequest) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 2 with SessionResponse

use of wooteco.prolog.session.application.dto.SessionResponse 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"));
}
Also used : MissionRequest(wooteco.prolog.session.application.dto.MissionRequest) GithubProfileResponse(wooteco.prolog.login.application.dto.GithubProfileResponse) MissionResponse(wooteco.prolog.session.application.dto.MissionResponse) SessionResponse(wooteco.prolog.session.application.dto.SessionResponse) SessionRequest(wooteco.prolog.session.application.dto.SessionRequest) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 3 with SessionResponse

use of wooteco.prolog.session.application.dto.SessionResponse in project prolog by woowacourse.

the class MissionServiceTest method setUp.

@BeforeEach
void setUp() {
    SessionResponse sessionResponse1 = sessionService.create(new SessionRequest("세션1"));
    session1 = new Session(sessionResponse1.getId(), sessionResponse1.getName());
    SessionResponse sessionResponse2 = sessionService.create(new SessionRequest("세션2"));
    session2 = new Session(sessionResponse2.getId(), sessionResponse2.getName());
    SessionResponse sessionResponse3 = sessionService.create(new SessionRequest("세션3"));
    session3 = new Session(sessionResponse3.getId(), sessionResponse3.getName());
}
Also used : SessionResponse(wooteco.prolog.session.application.dto.SessionResponse) SessionRequest(wooteco.prolog.session.application.dto.SessionRequest) Session(wooteco.prolog.session.domain.Session) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 4 with SessionResponse

use of wooteco.prolog.session.application.dto.SessionResponse in project prolog by woowacourse.

the class PopularStudylogServiceTest method setUp.

@BeforeEach
void setUp() {
    SessionResponse sessionResponse1 = sessionService.create(new SessionRequest("세션1"));
    SessionResponse sessionResponse2 = sessionService.create(new SessionRequest("세션2"));
    this.session1 = new Session(sessionResponse1.getId(), sessionResponse1.getName());
    this.session2 = new Session(sessionResponse2.getId(), sessionResponse2.getName());
    MissionResponse missionResponse1 = missionService.create(new MissionRequest("자동차 미션", session1.getId()));
    MissionResponse missionResponse2 = missionService.create(new MissionRequest("수동차 미션", session2.getId()));
    this.mission1 = new Mission(missionResponse1.getId(), missionResponse1.getName(), session1);
    this.mission2 = new Mission(missionResponse2.getId(), missionResponse2.getName(), session1);
    this.member1 = memberService.findOrCreateMember(new GithubProfileResponse("이름1", "별명1", "1", "image"));
    this.member2 = memberService.findOrCreateMember(new GithubProfileResponse("이름2", "별명2", "2", "image"));
    this.loginMember1 = new LoginMember(member1.getId(), Authority.MEMBER);
    this.loginMember2 = new LoginMember(member2.getId(), Authority.MEMBER);
    this.loginMember3 = new LoginMember(null, Authority.ANONYMOUS);
    this.studylog1 = new Studylog(member1, STUDYLOG1_TITLE, "피케이와 포모의 스터디로그", mission1, asList(tag1, tag2));
    this.studylog2 = new Studylog(member1, STUDYLOG2_TITLE, "피케이와 포모의 스터디로그 2", mission1, asList(tag2, tag3));
    this.studylog3 = new Studylog(member2, STUDYLOG3_TITLE, "피케이 스터디로그", mission2, asList(tag3, tag4, tag5));
    this.studylog4 = new Studylog(member2, STUDYLOG4_TITLE, "포모의 스터디로그", mission2, emptyList());
}
Also used : MissionRequest(wooteco.prolog.session.application.dto.MissionRequest) GithubProfileResponse(wooteco.prolog.login.application.dto.GithubProfileResponse) MissionResponse(wooteco.prolog.session.application.dto.MissionResponse) LoginMember(wooteco.prolog.login.ui.LoginMember) Mission(wooteco.prolog.session.domain.Mission) SessionResponse(wooteco.prolog.session.application.dto.SessionResponse) SessionRequest(wooteco.prolog.session.application.dto.SessionRequest) Studylog(wooteco.prolog.studylog.domain.Studylog) Session(wooteco.prolog.session.domain.Session) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 5 with SessionResponse

use of wooteco.prolog.session.application.dto.SessionResponse in project prolog by woowacourse.

the class StudylogServiceTest method setUp.

@BeforeEach
void setUp() {
    SessionResponse sessionResponse1 = sessionService.create(new SessionRequest("세션1"));
    SessionResponse sessionResponse2 = sessionService.create(new SessionRequest("세션2"));
    this.session1 = new Session(sessionResponse1.getId(), sessionResponse1.getName());
    this.session2 = new Session(sessionResponse2.getId(), sessionResponse2.getName());
    MissionResponse missionResponse1 = missionService.create(new MissionRequest("자동차 미션", session1.getId()));
    MissionResponse missionResponse2 = missionService.create(new MissionRequest("수동차 미션", session2.getId()));
    this.mission1 = new Mission(missionResponse1.getId(), missionResponse1.getName(), session1);
    this.mission2 = new Mission(missionResponse2.getId(), missionResponse2.getName(), session1);
    this.member1 = memberService.findOrCreateMember(new GithubProfileResponse("이름1", "별명1", "1", "image"));
    this.member2 = memberService.findOrCreateMember(new GithubProfileResponse("이름2", "별명2", "2", "image"));
    this.loginMember1 = new LoginMember(member1.getId(), Authority.MEMBER);
    this.loginMember2 = new LoginMember(member2.getId(), Authority.MEMBER);
    this.loginMember3 = new LoginMember(null, Authority.ANONYMOUS);
    this.studylog1 = new Studylog(member1, STUDYLOG1_TITLE, "피케이와 포모의 스터디로그", session1, mission1, asList(tag1, tag2));
    this.studylog2 = new Studylog(member1, STUDYLOG2_TITLE, "피케이와 포모의 스터디로그 2", session1, mission1, asList(tag2, tag3));
    this.studylog3 = new Studylog(member2, STUDYLOG3_TITLE, "피케이 스터디로그", session1, mission2, asList(tag3, tag4, tag5));
    this.studylog4 = new Studylog(member2, STUDYLOG4_TITLE, "포모의 스터디로그", session1, mission2, emptyList());
}
Also used : MissionRequest(wooteco.prolog.session.application.dto.MissionRequest) GithubProfileResponse(wooteco.prolog.login.application.dto.GithubProfileResponse) MissionResponse(wooteco.prolog.session.application.dto.MissionResponse) LoginMember(wooteco.prolog.login.ui.LoginMember) Mission(wooteco.prolog.session.domain.Mission) SessionResponse(wooteco.prolog.session.application.dto.SessionResponse) SessionRequest(wooteco.prolog.session.application.dto.SessionRequest) Studylog(wooteco.prolog.studylog.domain.Studylog) Session(wooteco.prolog.session.domain.Session) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

BeforeEach (org.junit.jupiter.api.BeforeEach)5 SessionRequest (wooteco.prolog.session.application.dto.SessionRequest)5 SessionResponse (wooteco.prolog.session.application.dto.SessionResponse)5 GithubProfileResponse (wooteco.prolog.login.application.dto.GithubProfileResponse)4 MissionRequest (wooteco.prolog.session.application.dto.MissionRequest)4 MissionResponse (wooteco.prolog.session.application.dto.MissionResponse)4 Session (wooteco.prolog.session.domain.Session)3 LoginMember (wooteco.prolog.login.ui.LoginMember)2 Mission (wooteco.prolog.session.domain.Mission)2 Studylog (wooteco.prolog.studylog.domain.Studylog)2