-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
This reverts commit f28c979.
- Loading branch information
1 parent
d4f10b8
commit b170317
Showing
130 changed files
with
1,485 additions
and
2,759 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
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 |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
|
||
@Profile("acceptance") | ||
public class AcceptanceSteps { | ||
|
||
@Autowired | ||
public AcceptanceContext context; | ||
} |
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 |
---|---|---|
|
@@ -4,5 +4,4 @@ | |
|
||
@Cucumber | ||
public class AcceptanceTestRunnerIT { | ||
|
||
} |
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
96 changes: 19 additions & 77 deletions
96
backend/src/acceptanceTest/java/wooteco/prolog/fixtures/PostAcceptanceFixture.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 |
---|---|---|
@@ -1,87 +1,29 @@ | ||
package wooteco.prolog.fixtures; | ||
|
||
import static java.util.stream.Collectors.toList; | ||
import static wooteco.prolog.fixtures.TagAcceptanceFixture.TAG1; | ||
import static wooteco.prolog.fixtures.TagAcceptanceFixture.TAG2; | ||
import static wooteco.prolog.fixtures.TagAcceptanceFixture.TAG3; | ||
import static wooteco.prolog.fixtures.TagAcceptanceFixture.TAG4; | ||
import static wooteco.prolog.fixtures.TagAcceptanceFixture.TAG5; | ||
import static wooteco.prolog.fixtures.TagAcceptanceFixture.TAG6; | ||
|
||
import java.util.List; | ||
import java.util.stream.Collectors; | ||
import wooteco.prolog.post.application.dto.PostRequest; | ||
import wooteco.prolog.tag.dto.TagRequest; | ||
|
||
import java.util.Arrays; | ||
|
||
public enum PostAcceptanceFixture { | ||
POST1( | ||
"[자바][옵셔널] 학습log 제출합니다.", | ||
"옵셔널은 NPE를 배제하기 위해 만들어진 자바8에 추가된 라이브러리입니다. \n " + | ||
"다양한 메소드를 호출하여 원하는 대로 활용할 수 있습니다", | ||
1L, | ||
TAG1, | ||
TAG2 | ||
), | ||
POST2( | ||
"[자바스크립트][비동기] 학습log 제출합니다.", | ||
"모던 JS의 fetch문, ajax라이브러리인 axios등을 통해 비동기 요청을 \n " + | ||
"편하게 할 수 있습니다. 자바 최고", | ||
2L, | ||
TAG3, | ||
TAG4 | ||
), | ||
POST3( | ||
"[자료구조] 자료구조는 어려워요", | ||
"진짜 어려움", | ||
1L, | ||
TAG1, | ||
TAG5 | ||
), | ||
POST4( | ||
"[DOM] DOM DOM Dance", | ||
"덤덤 댄스 아니고", | ||
2L | ||
), | ||
POST5( | ||
"[알고리즘] 자료구조의 big O에 관하여", | ||
"big O는 small O보다 크다", | ||
2L, | ||
TAG5, | ||
TAG6 | ||
public class PostAcceptanceFixture { | ||
public static PostRequest firstPost = new PostRequest( | ||
"[자바][옵셔널] 학습log 제출합니다.", | ||
"옵셔널은 NPE를 배제하기 위해 만들어진 자바8에 추가된 라이브러리입니다. \n " + | ||
"다양한 메소드를 호출하여 원하는 대로 활용할 수 있습니다", | ||
1L, | ||
Arrays.asList( | ||
new TagRequest("자바"), | ||
new TagRequest("Optional") | ||
) | ||
); | ||
|
||
PostAcceptanceFixture( | ||
String title, | ||
String content, | ||
Long missionId, | ||
TagAcceptanceFixture... tags) { | ||
this.tags = Arrays.asList(tags); | ||
List<TagRequest> tagRequests = Arrays.stream(tags) | ||
.map(TagAcceptanceFixture::getTagRequest) | ||
.collect(toList()); | ||
this.postRequest = new PostRequest(title, content, missionId, tagRequests); | ||
} | ||
|
||
private final PostRequest postRequest; | ||
private final List<TagAcceptanceFixture> tags; | ||
|
||
public PostRequest getPostRequest() { | ||
return postRequest; | ||
} | ||
|
||
public static List<PostRequest> findByMissionNumber(Long missionId) { | ||
return Arrays.stream(PostAcceptanceFixture.values()) | ||
.map(PostAcceptanceFixture::getPostRequest) | ||
.filter(it -> it.getMissionId().equals(missionId)) | ||
.collect(toList()); | ||
} | ||
|
||
public static List<PostRequest> findByTagNumber(Long tagId) { | ||
return Arrays.stream(PostAcceptanceFixture.values()) | ||
.filter(it -> it.tags.stream().anyMatch(tag -> tag.getTagId().equals(tagId))) | ||
.map(PostAcceptanceFixture::getPostRequest) | ||
.collect(toList()); | ||
} | ||
public static PostRequest secondPost = new PostRequest("[자바스크립트][비동기] 학습log 제출합니다.", | ||
"모던 JS의 fetch문, ajax라이브러리인 axios등을 통해 비동기 요청을 \n " + | ||
"편하게 할 수 있습니다. 자바 최고", | ||
2L, | ||
Arrays.asList( | ||
new TagRequest("자바스크립트"), | ||
new TagRequest("비동기") | ||
) | ||
); | ||
} |
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
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
Oops, something went wrong.