Skip to content

Commit

Permalink
Merge branch 'f-lab-edu#198-Publisher-빈-어플리케이션에-추가' of https://github…
Browse files Browse the repository at this point in the history
….com/JooHyukKim/in-bob-we-trust into f-lab-edu#198-Publisher-빈-어플리케이션에-추가
  • Loading branch information
JooHyukKim committed Mar 17, 2022
2 parents 49e9568 + 3668f40 commit cc553b0
Showing 1 changed file with 16 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,6 @@
import org.testcontainers.junit.jupiter.Container;
import org.testcontainers.junit.jupiter.Testcontainers;

import java.time.LocalDateTime;

import static org.junit.Assert.assertTrue;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;

@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@AutoConfigureWebTestClient
@Testcontainers
Expand Down Expand Up @@ -61,15 +53,15 @@ void sendAddDeliveryEventTest() throws InterruptedException {
var delivery = makeValidDelivery();
// when
var resBody = this.webTestClient
.post()
.uri("/api/delivery")
.bodyValue(delivery)
.exchange()
.expectStatus()
.isOk()
.expectBody(Delivery.class)
.returnResult()
.getResponseBody();
.post()
.uri("/api/delivery")
.bodyValue(delivery)
.exchange()
.expectStatus()
.isOk()
.expectBody(Delivery.class)
.returnResult()
.getResponseBody();

Thread.sleep(1000L);
// then
Expand All @@ -82,12 +74,12 @@ void sendAddDeliveryEventTest() throws InterruptedException {

private Delivery makeValidDelivery() {
return Delivery.builder()
.shopId("shop1234")
.orderId("order-1234")
.customerId("customer-1234")
.address("서울시 강남구 삼성동 봉은사로 12-41")
.phoneNumber("01031583212")
.orderTime(LocalDateTime.now())
.build();
.shopId("shop1234")
.orderId("order-1234")
.customerId("customer-1234")
.address("서울시 강남구 삼성동 봉은사로 12-41")
.phoneNumber("01031583212")
.orderTime(LocalDateTime.now())
.build();
}
}

0 comments on commit cc553b0

Please sign in to comment.