Skip to content
This repository has been archived by the owner on Aug 13, 2022. It is now read-only.

#193 delivery relay service 모듈 구조 변경 #197

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.inbobwetrust.relay;
package com.inbobwetrust.controller;

import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
package com.inbobwetrust.relay;
package com.inbobwetrust.controller;

import com.inbobwetrust.relay.domain.Delivery;
import com.inbobwetrust.relay.domain.ReceiverType;
import com.inbobwetrust.relay.domain.RelayRequest;
import javax.validation.Valid;
import com.inbobwetrust.domain.Delivery;
import com.inbobwetrust.domain.ReceiverType;
import com.inbobwetrust.domain.RelayRequest;
import com.inbobwetrust.repository.RelayRepository;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import reactor.core.publisher.Mono;

import javax.validation.Valid;

@RestController
@RequiredArgsConstructor
@RequestMapping(value = "/relay/v1")
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.inbobwetrust.relay.domain;
package com.inbobwetrust.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import java.time.LocalDateTime;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.inbobwetrust.relay.domain;
package com.inbobwetrust.domain;

public enum DeliveryStatus {
DECLINED("접수", "접수"),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.inbobwetrust.relay.domain;
package com.inbobwetrust.domain;

public enum ReceiverType {
SHOP,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.inbobwetrust.relay.domain;
package com.inbobwetrust.domain;

import lombok.Data;
import org.springframework.data.annotation.Id;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.inbobwetrust.relay;
package com.inbobwetrust.exception;

import java.util.stream.Collectors;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.support.DefaultMessageSourceResolvable;
import org.springframework.http.HttpStatus;
Expand All @@ -9,6 +8,8 @@
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.support.WebExchangeBindException;

import java.util.stream.Collectors;

@ControllerAdvice
@Slf4j
public class ExceptionHandlerAdvice {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.inbobwetrust.relay;
package com.inbobwetrust.repository;

import com.inbobwetrust.relay.domain.RelayRequest;
import com.inbobwetrust.domain.RelayRequest;
import org.springframework.data.repository.reactive.ReactiveCrudRepository;

public interface RelayRepository extends ReactiveCrudRepository<RelayRequest, String> {}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import static org.junit.jupiter.api.Assertions.assertTrue;

import com.inbobwetrust.controller.HealthCheckController;
import groovy.util.logging.Slf4j;
import java.util.Objects;
import org.junit.jupiter.api.DisplayName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.when;

import com.inbobwetrust.relay.domain.Delivery;
import com.inbobwetrust.relay.domain.DeliveryStatus;
import com.inbobwetrust.relay.domain.ReceiverType;
import com.inbobwetrust.relay.domain.RelayRequest;
import com.inbobwetrust.controller.RelayController;
import com.inbobwetrust.domain.Delivery;
import com.inbobwetrust.domain.DeliveryStatus;
import com.inbobwetrust.domain.ReceiverType;
import com.inbobwetrust.domain.RelayRequest;
import java.time.LocalDateTime;
import java.util.stream.Stream;

import com.inbobwetrust.repository.RelayRepository;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.params.ParameterizedTest;
Expand All @@ -30,7 +33,8 @@ class RelayControllerTest {

@Autowired WebTestClient testClient;

@MockBean RelayRepository relayRepository;
@MockBean
RelayRepository relayRepository;

private final String BASE_URL = "/relay/v1";

Expand Down