forked from thoughtworks/HeartBeat
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ADM-794:[backend]fix: add test for pipeline (#1014)
* ADM-794:[backend]fix: add test for generate report * ADM-794:[backend]fix: repair test for pipeline * ADM-794:[backend]fix: add test for pipeline * ADM-794:[backend]fix: refactor code * ADM-794:[backend]fix: refactor for report service test --------- Co-authored-by: yunsong.yang <[email protected]>
- Loading branch information
1 parent
a436d74
commit 9197e13
Showing
5 changed files
with
117 additions
and
58 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
41 changes: 41 additions & 0 deletions
41
backend/src/test/java/heartbeat/service/report/KanbanFixture.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,41 @@ | ||
package heartbeat.service.report; | ||
|
||
import heartbeat.controller.board.dto.request.RequestJiraBoardColumnSetting; | ||
import heartbeat.controller.board.dto.request.StoryPointsAndCycleTimeRequest; | ||
import heartbeat.controller.board.dto.response.TargetField; | ||
import heartbeat.controller.report.dto.request.JiraBoardSetting; | ||
|
||
import java.util.List; | ||
|
||
public class KanbanFixture { | ||
|
||
public static JiraBoardSetting MOCK_JIRA_BOARD_SETTING() { | ||
return JiraBoardSetting.builder() | ||
.users(List.of("user1")) | ||
.token("token") | ||
.type("jira") | ||
.site("site") | ||
.projectKey("ADM") | ||
.boardId("2") | ||
.boardColumns(List.of(RequestJiraBoardColumnSetting.builder().value("DONE").name("DONE").build())) | ||
.targetFields(List.of(TargetField.builder().key("customer").build())) | ||
.treatFlagCardAsBlock(true) | ||
.assigneeFilter("assignee") | ||
.build(); | ||
} | ||
|
||
public static StoryPointsAndCycleTimeRequest MOCK_EXPECT_STORY_POINT_AND_CYCLE_TIME_REQUEST() { | ||
return StoryPointsAndCycleTimeRequest.builder() | ||
.token("token") | ||
.type("jira") | ||
.site("site") | ||
.project("ADM") | ||
.boardId("2") | ||
.targetFields(List.of(TargetField.builder().key("customer").build())) | ||
.treatFlagCardAsBlock(true) | ||
.startTime("startTime") | ||
.endTime("endTime") | ||
.build(); | ||
} | ||
|
||
} |
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.