Skip to content

Commit

Permalink
[feature/Inhabas#241] spotlessApply:
Browse files Browse the repository at this point in the history
  • Loading branch information
skytin1004 committed Mar 6, 2024
1 parent c828eb8 commit 5f1ba02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.inhabas.api.domain.contest.domain;

import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.when;

import java.time.LocalDate;
import java.util.ArrayList;
Expand Down Expand Up @@ -29,13 +30,16 @@ class ContestBoardTest {
void setUp() {
MockitoAnnotations.openMocks(this);

Long contestFieldId = 1L;
String title = "테스트 공모전";
String content = "테스트 내용";
String association = "테스트 협회";
String topic = "테스트 주제";
LocalDate dateContestStart = LocalDate.of(2023, 1, 1);
LocalDate dateContestEnd = LocalDate.of(2023, 12, 31);

when(contestField.getId()).thenReturn(contestFieldId);

contestBoard =
ContestBoard.builder()
.menu(menu)
Expand Down Expand Up @@ -68,7 +72,7 @@ void updateContestBoardTest() {
// Given

ContestBoard contestBoard = new ContestBoard();
Long newContestFieldId = 1L;
Long newContestFieldId = 2L;
String newTitle = "새로운 제목";
String newContent = "새로운 내용";
String newAssociation = "새로운 협회";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ void updateContestBoard() {
// then
then(contestBoardRepository).should(times(1)).findById(any());
then(contestBoardRepository).should(times(1)).save(any());

}

@DisplayName("Contest board 게시글을 삭제한다.")
Expand Down

0 comments on commit 5f1ba02

Please sign in to comment.