-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
flawmop
committed
Dec 17, 2024
1 parent
ae55e1f
commit 704659c
Showing
9 changed files
with
295 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
...est-i/java/com/insilicosoft/portal/svc/submission/controller/SubmissionControllerIT2.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
package com.insilicosoft.portal.svc.submission.controller; | ||
|
||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
import org.junit.jupiter.api.extension.ExtendWith; | ||
import org.mockito.Mock; | ||
import org.mockito.junit.jupiter.MockitoExtension; | ||
import org.springframework.test.web.reactive.server.WebTestClient; | ||
|
||
import com.insilicosoft.portal.svc.submission.SubmissionIdentifiers; | ||
import com.insilicosoft.portal.svc.submission.exception.EntityNotAccessibleException; | ||
import com.insilicosoft.portal.svc.submission.service.InputProcessorService; | ||
import com.insilicosoft.portal.svc.submission.service.SubmissionService; | ||
|
||
@ExtendWith(MockitoExtension.class) | ||
public class SubmissionControllerIT2 { | ||
|
||
@Mock | ||
private InputProcessorService mockInputProcessorService; | ||
@Mock | ||
private SubmissionService mockSubmissionService; | ||
|
||
private WebTestClient client; | ||
|
||
@BeforeEach | ||
void beforeEach() { | ||
client = WebTestClient.bindToController(new SubmissionController(mockInputProcessorService, | ||
mockSubmissionService)).build(); | ||
} | ||
|
||
@Test | ||
void test() throws EntityNotAccessibleException { | ||
var submissionId = 1l; | ||
var url = SubmissionIdentifiers.REQUEST_MAPPING_SUBMISSION + "/" + String.valueOf(submissionId); | ||
|
||
//when(mockSubmissionService.retrieve(submissionId)) | ||
// .thenThrow(new EntityNotAccessibleException("Entity", "1")); | ||
|
||
client.get().uri(url) | ||
.exchange() | ||
.expectStatus().is2xxSuccessful(); | ||
|
||
//verifyNoInteractions(mockInputProcessorService, mockSubmissionService); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.