Skip to content

Commit

Permalink
f-lab-edu#30 mysql 설정수정
Browse files Browse the repository at this point in the history
  • Loading branch information
kimsuyeondev committed May 25, 2024
1 parent ef91e96 commit 4fd5056
Showing 1 changed file with 4 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ private static GoodsManagementRequest requestGoods() {

@DisplayName("상품등록")
@Test
@Order(1)
public void 상품등록() throws Exception {
String url = "http://localhost:" + port + "/v1/goods";
GoodsManagementRequest goodsManagementRequest = requestGoods();
Expand All @@ -75,25 +74,22 @@ private static GoodsManagementRequest requestGoods() {

@DisplayName("상품 조회")
@Test
@Order(2)
public void 상품조회() throws Exception {
String url = "http://localhost:" + port + "/v1/goods/{goodsNo}";
ResponseEntity<GoodsManagementResponse> responseEntity = testRestTemplate.getForEntity(url, GoodsManagementResponse.class, 3L);
ResponseEntity<GoodsManagementResponse> responseEntity = testRestTemplate.getForEntity(url, GoodsManagementResponse.class, 1L);
assertThat(responseEntity.getStatusCode()).isEqualTo(HttpStatus.OK);
assertThat(responseEntity.getBody().getGoodsNm()).isEqualTo("닥터스킨");
}

@DisplayName("상품 삭제")
/* @DisplayName("상품 삭제")
@Test
@Order(3)
public void 상품_삭제(){
String url = "http://localhost:" + port + "/v1/goods/{goodsNo}";
ResponseEntity<GoodsManagementResponse> responseEntity = testRestTemplate.exchange(url, HttpMethod.DELETE, null, GoodsManagementResponse.class, 3L);
ResponseEntity<GoodsManagementResponse> responseEntity = testRestTemplate.exchange(url, HttpMethod.DELETE, null, GoodsManagementResponse.class, 26L);
assertThat(responseEntity.getStatusCode()).isEqualTo(HttpStatus.OK);
}
}*/

@Test
@Order(4)
@DisplayName("삭제할 상품번호가 존재하지 않습니다._ llegalArgumentExceptionHandler 테스트")
public void illegalGoodsTest() throws Exception {
String goodsNo = "존재하지않는상품번호";
Expand Down

0 comments on commit 4fd5056

Please sign in to comment.