mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-22 00:25:08 +00:00
docs: update microservices idempotent consumer
This commit is contained in:
+2
-2
@@ -39,12 +39,12 @@ import org.springframework.boot.CommandLineRunner;
|
||||
class AppTest {
|
||||
|
||||
@Test
|
||||
void main() {
|
||||
void testMain() {
|
||||
assertDoesNotThrow(() -> App.main(new String[] {}));
|
||||
}
|
||||
|
||||
@Test
|
||||
void run() throws Exception {
|
||||
void testRun() throws Exception {
|
||||
RequestService requestService = Mockito.mock(RequestService.class);
|
||||
RequestRepository requestRepository = Mockito.mock(RequestRepository.class);
|
||||
UUID uuid = UUID.randomUUID();
|
||||
|
||||
+1
-2
@@ -43,11 +43,10 @@ import org.mockito.junit.jupiter.MockitoExtension;
|
||||
class RequestServiceTests {
|
||||
private RequestService requestService;
|
||||
@Mock private RequestRepository requestRepository;
|
||||
private RequestStateMachine requestStateMachine;
|
||||
|
||||
@BeforeEach
|
||||
void setUp() {
|
||||
requestStateMachine = new RequestStateMachine();
|
||||
RequestStateMachine requestStateMachine = new RequestStateMachine();
|
||||
requestService = new RequestService(requestRepository, requestStateMachine);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ class RequestStateMachineTests {
|
||||
private RequestStateMachine requestStateMachine;
|
||||
|
||||
@BeforeEach
|
||||
public void setUp() {
|
||||
void setUp() {
|
||||
requestStateMachine = new RequestStateMachine();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user