-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: LoginDocument mock이용한 테스트로 수정 * refactor(MissionDocumentation): mock이용한 테스트로 수정 * refactor(ProfileDocumentation): mock이용한 테스트로 수정 + response fixture 생성 * refactor(CommentDocumentation): mock 이용한 테스트로 수정 * refactor(MemberDocumentation, MemberReactionDocumentation): mock 이용한 테스트로 수정 * refactor(SessionMemberDocumentation): mock 이용한 테스트로 수정 * refactor(TagDocumentation): mock 이용한 테스트로 수정 * refactor(StudylogOverviewDocumentation): mock 이용한 테스트로 수정 * feat: comment count svg 변경 (#1063) * chore: comment svg 수정 * chore: comment svg 수정 * feat: 로드맵을 위한 하위 컴포넌트 구현 (#1047) * chore: storybook 사용을 위해 reactDocgen 에러 설정 * feat: 상위에서 크기를 제어하는 ResponsiveButton 컴포넌트 구현 * feat: LabelledImage 컴포넌트 구현 * feat: KeywordSection 컴포넌트 구현 * refactor: Omit -> Pick으로 타입 변경 * feat: fontSize를 Style Props 인자로 내려주기 * feat: 로드맵을 위한 하위 컴포넌트 구현(sidesheet modal) (#1048) * refactor(StudylogRssFeedDocumentation): mock 이용한 테스트로 수정 * chore: 자바 버전을 8에서 9로 변경 * test(StudylogRssFeedDocumentation): 응답 fixture로 빼기 * chore: 자바9 -> 8 변경 * chore: 자바9 -> 8 변경 Co-authored-by: JUDONGHYEOK <[email protected]> Co-authored-by: 김의진 <[email protected]> Co-authored-by: Marco <[email protected]>
- Loading branch information
Showing
27 changed files
with
1,043 additions
and
761 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
121 changes: 121 additions & 0 deletions
121
backend/src/documentation/java/wooteco/prolog/ResponseFixture.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
package wooteco.prolog; | ||
|
||
import static wooteco.prolog.member.domain.Role.CREW; | ||
|
||
import java.sql.Date; | ||
import java.time.Instant; | ||
import java.time.LocalDateTime; | ||
import java.util.Arrays; | ||
import java.util.Collections; | ||
import java.util.List; | ||
import wooteco.prolog.member.application.dto.MemberResponse; | ||
import wooteco.prolog.member.domain.Member; | ||
import wooteco.prolog.member.domain.Role; | ||
import wooteco.prolog.session.application.dto.MissionResponse; | ||
import wooteco.prolog.session.application.dto.SessionResponse; | ||
import wooteco.prolog.studylog.application.dto.CalendarStudylogResponse; | ||
import wooteco.prolog.studylog.application.dto.CommentMemberResponse; | ||
import wooteco.prolog.studylog.application.dto.CommentResponse; | ||
import wooteco.prolog.studylog.application.dto.CommentsResponse; | ||
import wooteco.prolog.studylog.application.dto.MemberTagResponse; | ||
import wooteco.prolog.studylog.application.dto.StudylogResponse; | ||
import wooteco.prolog.studylog.application.dto.StudylogRssFeedResponse; | ||
import wooteco.prolog.studylog.application.dto.StudylogsResponse; | ||
import wooteco.prolog.studylog.application.dto.TagResponse; | ||
|
||
public class ResponseFixture { | ||
|
||
public static final SessionResponse SESSION_RESPONSE = | ||
new SessionResponse(1L, "세션1"); | ||
|
||
public static final MissionResponse MISSION_RESPONSE1 = | ||
new MissionResponse(1L, "지하철 노선도 미션", SESSION_RESPONSE); | ||
|
||
public static final MissionResponse MISSION_RESPONSE2 = | ||
new MissionResponse(1L, "로또 미션", SESSION_RESPONSE); | ||
|
||
public static final MemberResponse MEMBER_RESPONSE = new MemberResponse( | ||
1L, | ||
"soulG", | ||
"잉", | ||
CREW, | ||
"https://avatars.githubusercontent.com/u/52682603?v=4" | ||
); | ||
|
||
public static final StudylogResponse STUDYLOG_RESPONSE1 = new StudylogResponse( | ||
1L, | ||
MEMBER_RESPONSE, | ||
LocalDateTime.now(), | ||
LocalDateTime.now(), | ||
SESSION_RESPONSE, | ||
MISSION_RESPONSE1, | ||
"JAVA", | ||
"Spring Data JPA를 학습함.", | ||
Arrays.asList(new TagResponse(3L, "java"), new TagResponse(4L, "jpa")), | ||
Collections.emptyList(), | ||
false, | ||
false, | ||
0, | ||
false, | ||
0 | ||
); | ||
|
||
private static final StudylogResponse STUDYLOG_RESPONSE2 = new StudylogResponse( | ||
2L, | ||
MEMBER_RESPONSE, | ||
LocalDateTime.now(), | ||
LocalDateTime.now(), | ||
SESSION_RESPONSE, | ||
MISSION_RESPONSE2, | ||
"SPA", | ||
"SPA 방식으로 앱을 구현하였음.\nrouter 를 구현 하여 이용함.\n", | ||
Arrays.asList(new TagResponse(1L, "spa"), new TagResponse(2L, "router")), | ||
Collections.emptyList(), | ||
false, | ||
false, | ||
0, | ||
false, | ||
0 | ||
); | ||
|
||
public static final StudylogsResponse STUDYLOGS_RESPONSE = new StudylogsResponse(Arrays.asList( | ||
STUDYLOG_RESPONSE1, | ||
STUDYLOG_RESPONSE2 | ||
), 2L, 1, 1); | ||
|
||
public static final String COMMENT = "댓글의 내용입니다."; | ||
public static final CommentsResponse COMMENTS_RESPONSE = new CommentsResponse(Arrays.asList( | ||
new CommentResponse(1L, | ||
new CommentMemberResponse(1L, "yboy", "잉", | ||
"https://avatars.githubusercontent.com/u/52682603?v=4", "CREW") | ||
, COMMENT, | ||
LocalDateTime.now()) | ||
)); | ||
|
||
public static final Member MEMBER | ||
= new Member("yboy", "잉", Role.CREW, 1L, GithubResponses.소롱.getAvatarUrl()); | ||
|
||
public static final TagResponse TAG_RESPONSE1 = new TagResponse(1L, "자바"); | ||
public static final TagResponse TAG_RESPONSE2 = new TagResponse(2L, "코틀린"); | ||
|
||
public static final List<TagResponse> TAG_RESPONSES = Arrays.asList( | ||
TAG_RESPONSE1, | ||
TAG_RESPONSE2 | ||
); | ||
|
||
public static final List<MemberTagResponse> MEMBER_TAB_RESPONSES = Arrays.asList( | ||
new MemberTagResponse(TAG_RESPONSE1, 2), | ||
new MemberTagResponse(TAG_RESPONSE2, 2) | ||
); | ||
|
||
public static final List<CalendarStudylogResponse> CALENDER_STUDYLOG_RESPONSES = Arrays.asList( | ||
new CalendarStudylogResponse(1L, "instanceOf()를 지양하자", LocalDateTime.now().minusMonths(2), | ||
LocalDateTime.now()), | ||
new CalendarStudylogResponse(2L, "JPA 쿼리 개선기", LocalDateTime.now().minusMonths(1), | ||
LocalDateTime.now()) | ||
); | ||
|
||
public static final List<StudylogRssFeedResponse> STUDYLOG_RSS_FEED_RESPONSES = Arrays.asList( | ||
new StudylogRssFeedResponse("Prolog | 우아한테크코스 학습로그 저장소", "자바", "잉", "http://localhost:8080", | ||
Date.from(Instant.now()))); | ||
} |
Oops, something went wrong.