Skip to content

Commit

Permalink
Fix #334: Replace guava ImmutableList by Java API
Browse files Browse the repository at this point in the history
  • Loading branch information
banterCZ committed Aug 31, 2022
1 parent 3fb0829 commit 32f1120
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
*/
package com.wultra.app.enrollmentserver.model.enumeration;

import com.google.common.collect.ImmutableList;

import java.util.List;

/**
Expand Down Expand Up @@ -67,7 +65,7 @@ public enum DocumentStatus {
/**
* All not finished statuses.
*/
public static final List<DocumentStatus> ALL_NOT_FINISHED = ImmutableList.of(
public static final List<DocumentStatus> ALL_NOT_FINISHED = List.of(
UPLOAD_IN_PROGRESS,
VERIFICATION_PENDING,
VERIFICATION_IN_PROGRESS
Expand All @@ -76,7 +74,7 @@ public enum DocumentStatus {
/**
* All unsuccessful statuses.
*/
public static final List<DocumentStatus> ALL_FAILED = ImmutableList.of(
public static final List<DocumentStatus> ALL_FAILED = List.of(
DISPOSED,
REJECTED,
FAILED
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
package com.wultra.app.onboardingserver.docverify.mock.provider;

import com.google.common.collect.ImmutableList;
import com.wultra.app.enrollmentserver.model.enumeration.CardSide;
import com.wultra.app.enrollmentserver.model.enumeration.DocumentType;
import com.wultra.app.enrollmentserver.model.enumeration.DocumentVerificationStatus;
Expand Down Expand Up @@ -83,7 +82,7 @@ public void checkDocumentUploadTest() throws Exception {
@Test
public void submitDocumentsTest() throws Exception {
SubmittedDocument document = createSubmittedDocument();
List<SubmittedDocument> documents = ImmutableList.of(document);
List<SubmittedDocument> documents = List.of(document);

DocumentsSubmitResult result = provider.submitDocuments(ownerId, documents);

Expand All @@ -92,7 +91,7 @@ public void submitDocumentsTest() throws Exception {

@Test
public void verifyDocumentsTest() throws Exception {
List<String> uploadIds = ImmutableList.of("doc_1", "doc_2");
List<String> uploadIds = List.of("doc_1", "doc_2");

DocumentsVerificationResult result = provider.verifyDocuments(ownerId, uploadIds);
assertEquals(DocumentVerificationStatus.IN_PROGRESS, result.getStatus());
Expand All @@ -101,7 +100,7 @@ public void verifyDocumentsTest() throws Exception {

@Test
public void getVerificationResultTest() throws Exception {
List<String> uploadIds = ImmutableList.of("doc_1", "doc_2");
List<String> uploadIds = List.of("doc_1", "doc_2");

DocumentsVerificationResult result = provider.verifyDocuments(ownerId, uploadIds);

Expand Down Expand Up @@ -134,7 +133,7 @@ public void getPhotoTest() throws Exception {

@Test
public void cleanupDocumentsTest() throws Exception {
List<String> uploadIds = ImmutableList.of("doc_1", "doc_2");
List<String> uploadIds = List.of("doc_1", "doc_2");

provider.cleanupDocuments(ownerId, uploadIds);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/
package com.wultra.app.onboardingserver.docverify.zenid.provider;

import com.google.common.collect.ImmutableList;
import com.wultra.app.onboardingserver.docverify.AbstractDocumentVerificationProviderTest;
import com.wultra.app.onboardingserver.docverify.zenid.ZenidConst;
import com.wultra.app.onboardingserver.EnrollmentServerTestApplication;
Expand Down Expand Up @@ -208,7 +207,7 @@ private DocumentsSubmitResult submitDocuments(OwnerId ownerId, List<SubmittedDoc
}

private List<SubmittedDocument> createSubmittedDocuments() throws Exception {
return ImmutableList.of(
return List.of(
createIdCardFrontDocument(),
createIdCardBackDocument()
);
Expand Down

0 comments on commit 32f1120

Please sign in to comment.