Skip to content

Commit

Permalink
test: 불필요한 테스트 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ503 committed Feb 7, 2024
1 parent d00f387 commit 1f07fe6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 100 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,64 +137,4 @@ class AdminPageControllerTest extends AdminPageControllerTestFixture {
.content(objectMapper.writeValueAsString(골_생성_요청))
).andExpect(status().isNoContent());
}

@Test
void 골을_생성시__이름이_없다면_400_예외를_발생시킨다() throws Exception {
// when & then
mockMvc.perform(post("/admin/goal")
.contentType(MediaType.APPLICATION_JSON)
.content(objectMapper.writeValueAsString(이름이_없는__생성_요청))
).andExpectAll(
status().isBadRequest(),
jsonPath("$.message").exists()
);
}

@Test
void 골을_생성시_시작_날짜가_없다면_400_예외를_발생시킨다() throws Exception {
// when & then
mockMvc.perform(post("/admin/goal")
.contentType(MediaType.APPLICATION_JSON)
.content(objectMapper.writeValueAsString(시작_날짜가_없는__생성_요청))
).andExpectAll(
status().isBadRequest(),
jsonPath("$.message").exists()
);
}

@Test
void 골을_생성시_종료_날짜가_없다면_400_예외를_발생시킨다() throws Exception {
// when & then
mockMvc.perform(post("/admin/goal")
.contentType(MediaType.APPLICATION_JSON)
.content(objectMapper.writeValueAsString(종료_날짜가_없는__생성_요청))
).andExpectAll(
status().isBadRequest(),
jsonPath("$.message").exists()
);
}

@Test
void 골을_생성시_생성자가_없다면_400_예외를_발생시킨다() throws Exception {
// when & then
mockMvc.perform(post("/admin/goal")
.contentType(MediaType.APPLICATION_JSON)
.content(objectMapper.writeValueAsString(골_생성자_아이디가_없는__생성_요청))
).andExpectAll(
status().isBadRequest(),
jsonPath("$.message").exists()
);
}

@Test
void 골을_생성시_팀원이_없다면_400_예외를_발생시킨다() throws Exception {
// when & then
mockMvc.perform(post("/admin/goal")
.contentType(MediaType.APPLICATION_JSON)
.content(objectMapper.writeValueAsString(팀원_아이디가_없는__생성_요청))
).andExpectAll(
status().isBadRequest(),
jsonPath("$.message").exists()
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,44 +58,4 @@ public class AdminPageControllerTestFixture {
List.of(골_생성_요청.manager(), 골_생성_요청.team())
);
protected Long_아이디 = 1L;
protected CreateGoalRequest 이름이_없는__생성_요청 = new CreateGoalRequest(
null,
_생성_요청.memo(),
_생성_요청.startDate(),
_생성_요청.endDate(),
_생성_요청.manager(),
_생성_요청.team()
);
protected CreateGoalRequest 시작_날짜가_없는__생성_요청 = new CreateGoalRequest(
_생성_요청.name(),
_생성_요청.memo(),
null,
_생성_요청.endDate(),
_생성_요청.manager(),
_생성_요청.team()
);
protected CreateGoalRequest 종료_날짜가_없는__생성_요청 = new CreateGoalRequest(
_생성_요청.name(),
_생성_요청.memo(),
_생성_요청.startDate(),
null,
_생성_요청.manager(),
_생성_요청.team()
);
protected CreateGoalRequest_생성자_아이디가_없는__생성_요청 = new CreateGoalRequest(
_생성_요청.name(),
_생성_요청.memo(),
_생성_요청.startDate(),
_생성_요청.endDate(),
null,
_생성_요청.team()
);
protected CreateGoalRequest 팀원_아이디가_없는__생성_요청 = new CreateGoalRequest(
_생성_요청.name(),
_생성_요청.memo(),
_생성_요청.startDate(),
_생성_요청.endDate(),
_생성_요청.manager(),
null
);
}

0 comments on commit 1f07fe6

Please sign in to comment.