Skip to content

Commit

Permalink
#270 TEST - 거래 댓글 작성 기능 - 통합 테스트
Browse files Browse the repository at this point in the history
  • Loading branch information
yuseogi0218 committed Mar 20, 2024
1 parent 445383e commit bfb6ce7
Show file tree
Hide file tree
Showing 9 changed files with 346 additions and 53 deletions.
2 changes: 1 addition & 1 deletion laser-ordermanage-server-submodule-config

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public class CreateIngredientStockAndPriceComponent {

@EventListener(ApplicationReadyEvent.class)
public void onApplicationReadyEvent() {
scheduleService.removeJobForCreateIngredientStockAndPrice();
scheduleService.createJobForCreateIngredientStockAndPrice();
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ public void removeJobForChangeStageToCompleted(Long orderId) {
this.removeJob(String.valueOf(orderId), ChangeStageToCompletedJob.class.getName());
}

public void removeJobForCreateIngredientStockAndPrice() {
this.removeJob(CreateIngredientStockAndPriceJob.class.getName(), CreateIngredientStockAndPriceJob.class.getName());
}

private void removeJob(String jobName, String groupName) {
JobKey jobKey = JobKey.jobKey(jobName, groupName);

Expand Down
5 changes: 3 additions & 2 deletions src/test/java/com/laser/ordermanage/common/APIUnitTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
/**
* API Unit Test
* 1. 테스트 성공
* 2. 요청 데이터(필드 및 파라미터) 검증
* 3. 해당 API 의 서비스 코드에서 발생하는 예외 검증
* 2. Authority 검증
* 3. 요청 데이터(필드 및 파라미터) 검증
* 4. 해당 API 의 서비스 코드에서 발생하는 예외 검증
*/
@ActiveProfiles("test")
@ContextConfiguration(classes = TestWebSecurityConfig.class)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.laser.ordermanage.common.config;

import com.querydsl.jpa.JPQLTemplates;
import com.querydsl.jpa.impl.JPAQueryFactory;
import jakarta.persistence.EntityManager;
import jakarta.persistence.PersistenceContext;
Expand All @@ -14,6 +15,6 @@ public class QuerydslTestConfig {

@Bean
public JPAQueryFactory queryFactory() {
return new JPAQueryFactory(entityManager);
return new JPAQueryFactory(JPQLTemplates.DEFAULT, entityManager);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
package com.laser.ordermanage.order.dto.request;

public class CreateCommentRequestBuilder {

public static CreateCommentRequest build() {
return new CreateCommentRequest("신규 댓글 내용");
}
}
Loading

0 comments on commit bfb6ce7

Please sign in to comment.