Skip to content
Open
Changes from 1 commit
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
ef7d876
updateREAEME
Jiwon-cho Jan 27, 2022
e561bf3
swagger,h2
Feb 3, 2022
b53e4ed
Merge branch 'feature/README' into main
Feb 3, 2022
587503f
swagger,h2
Feb 3, 2022
677ab6d
swagger 수정
Jiwon-cho Feb 3, 2022
9eb7cf8
board CRUD,SEARCH
Jiwon-cho Feb 7, 2022
0539af5
board CRUD,find
Jiwon-cho Feb 8, 2022
0185d14
swagger,CRD
Feb 10, 2022
1affd5c
Merge branch 'main' of https://github.com/Jiwon-cho/Anonymous_Server …
Feb 14, 2022
0888eea
swagger,CRD
Feb 15, 2022
dd17471
Merge branch 'main' into feature/README
choipureum Feb 16, 2022
39e816b
swagger,respons 적용중
Feb 16, 2022
fe343ce
Merge remote-tracking branch 'origin/feature/README' into feature/README
Feb 16, 2022
e45ad7b
Common class 생성
Jiwon-cho Feb 16, 2022
b3498c9
Merge branch 'main' of https://github.com/IloveDev-Crew/anonymous-ser…
Feb 25, 2022
2b5bfdf
BoardResponse,SaveRequestDTO 생성,Controller 수정
Feb 25, 2022
ed6b474
BoardResponse,SaveRequestDTO 생성,Controller 수정
Feb 25, 2022
664fe20
Merge branch 'main' of https://github.com/IloveDev-Crew/anonymous-ser…
Feb 25, 2022
d24d6f0
BoardResponse,SaveRequestDTO 생성,Controller 수정
Feb 25, 2022
7259335
Merge remote-tracking branch 'origin/main' into main
Mar 2, 2022
e6c216c
swagger,h2
Feb 3, 2022
49674f0
swagger 수정
Jiwon-cho Feb 3, 2022
275975a
board CRUD,SEARCH
Jiwon-cho Feb 7, 2022
4adc451
board CRUD,find
Jiwon-cho Feb 8, 2022
80c4238
swagger,CRD
Feb 10, 2022
aba21fc
swagger,CRD
Feb 15, 2022
9fc60c6
swagger,respons 적용중
Feb 16, 2022
a8841c6
Common class 생성
Jiwon-cho Feb 16, 2022
d0fe5a6
BoardResponse,SaveRequestDTO 생성,Controller 수정
Feb 25, 2022
999f72b
BoardResponse,SaveRequestDTO 생성,Controller 수정
Feb 25, 2022
e202620
BoardResponse,SaveRequestDTO 생성,Controller 수정
Feb 25, 2022
6c3d5b4
Board CRUD 브랜치 REBASE
Mar 3, 2022
56048f6
Merge remote-tracking branch 'origin/feature/Board_CRUD' into feature…
Mar 3, 2022
bcefa98
Board CRUD delte
Mar 4, 2022
fc65c58
Merge branch 'main' of https://github.com/IloveDev-Crew/anonymous-ser…
Mar 7, 2022
9da8222
Board CRUD,update,selectAll
Mar 7, 2022
e5c64f9
User,UserController 삭제,Transactional 변경
Mar 8, 2022
1199562
BoardResponse,SaveRequestDTO 삭제
Mar 11, 2022
343630c
controllerTest test
Jiwon-cho Mar 14, 2022
9f09d9f
controllerTest createTest
Jiwon-cho Mar 16, 2022
cf4c836
BoardControllerTest,deleteBoardTest 작성
Mar 17, 2022
5097be2
controllerTest,selectBoardTest,serviceTest
Jiwon-cho Mar 17, 2022
128f516
BoardControllerTest,When 추가
Mar 23, 2022
70df3ab
BoardControllerTest,When 추가
Mar 23, 2022
37bb9f6
BoardControllerTest,select,create test 로직 변경
Mar 24, 2022
5541e51
BoardRepositoryTest 작성,BoardFixture 내 메소드 추가
Jiwon-cho Mar 30, 2022
8725965
BoardServiceTest 추가
Jiwon-cho Mar 31, 2022
c5c1225
Post로 이름 수정,ServiceTest 코드 추가작성, 향후 메소드명 변경 계획
Jiwon-cho Apr 1, 2022
f8dce5a
method명 변경,Controller-updateTest 추가
Apr 4, 2022
e226d67
build Fail 확인용 커밋
Apr 5, 2022
6029a85
build Fail 확인용 커밋
Apr 5, 2022
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
Expand Up @@ -39,6 +39,10 @@ void createBoardTest() throws Exception{
.contentType(MediaType.APPLICATION_JSON)
.content(new ObjectMapper().writeValueAsString(boardRequest)))
.andExpect(status().isOk())
.andExpect(jsonPath("data.title").value(boardRequest.getTitle()))
.andExpect(jsonPath("data.content").value(boardRequest.getContent()))
.andExpect(jsonPath("data.author").value(boardRequest.getAuthor()))
.andExpect(jsonPath("data.authorId").value(boardRequest.getAuthorId()))
.andDo(print());

verify(boardService).createBoard(refEq(boardRequest));
Expand All @@ -61,10 +65,14 @@ void selectBoardsTest() throws Exception {
@DisplayName("게시판 단건 조회 테스트")
void selectBoardTest() throws Exception{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

throws Exception제거 및 예외케이스를 따로 만들어주세욤

BoardResponse boardResponse=BoardFixture.createBoardResponse();
given(boardService.selectBoard(boardResponse.getId())).willReturn(boardResponse);
when(boardService.selectBoard(boardResponse.getId())).thenReturn(boardResponse);

mockMvc.perform(get("/board/"+boardResponse.getId()))
.andExpect(status().isOk())
.andExpect(jsonPath("data.title").value(boardResponse.getTitle()))
.andExpect(jsonPath("data.content").value(boardResponse.getContent()))
.andExpect(jsonPath("data.author").value(boardResponse.getAuthor()))
.andExpect(jsonPath("data.authorId").value(boardResponse.getAuthorId()))
.andDo(print());
}

Expand Down