|
1 | 1 | package com.yoti.api.client.docs.session.retrieve;
|
2 | 2 |
|
3 | 3 | import static org.hamcrest.MatcherAssert.assertThat;
|
4 |
| -import static org.hamcrest.Matchers.hasSize; |
| 4 | +import static org.hamcrest.Matchers.contains; |
5 | 5 |
|
6 |
| -import java.util.ArrayList; |
7 | 6 | import java.util.Arrays;
|
8 | 7 | import java.util.List;
|
9 | 8 |
|
|
18 | 17 | @RunWith(MockitoJUnitRunner.class)
|
19 | 18 | public class GetSessionResultCheckTest {
|
20 | 19 |
|
21 |
| - private static final int SESSION_CHECKS = 14; |
22 |
| - |
23 | 20 | @Mock AuthenticityCheckResponse authenticityCheckResponse;
|
24 | 21 | @Mock FaceMatchCheckResponse faceMatchCheckResponse;
|
25 | 22 | @Mock FaceComparisonCheckResponse faceComparisonCheckResponse;
|
@@ -47,98 +44,98 @@ public void setUp() throws Exception {
|
47 | 44 | public void shouldFilterAuthenticityChecks() {
|
48 | 45 | List<AuthenticityCheckResponse> result = testObj.getAuthenticityChecks();
|
49 | 46 |
|
50 |
| - assertThat(result, hasSize(1)); |
| 47 | + assertThat(result, contains(authenticityCheckResponse)); |
51 | 48 | }
|
52 | 49 |
|
53 | 50 | @Test
|
54 | 51 | public void shouldFilterLivenessChecks() {
|
55 | 52 | List<LivenessCheckResponse> result = testObj.getLivenessChecks();
|
56 | 53 |
|
57 |
| - assertThat(result, hasSize(1)); |
| 54 | + assertThat(result, contains(livenessCheckResponse)); |
58 | 55 | }
|
59 | 56 |
|
60 | 57 | @Test
|
61 | 58 | public void shouldFilterTextDataChecks() {
|
62 | 59 | List<TextDataCheckResponse> result = testObj.getIdDocumentTextDataChecks();
|
63 | 60 |
|
64 |
| - assertThat(result, hasSize(1)); |
| 61 | + assertThat(result, contains(textDataCheckResponse)); |
65 | 62 | }
|
66 | 63 |
|
67 | 64 | @Test
|
68 | 65 | public void shouldFilterSupplementaryDocumentTextDataChecks() {
|
69 | 66 | List<SupplementaryDocumentTextDataCheckResponse> result = testObj.getSupplementaryDocumentTextDataChecks();
|
70 | 67 |
|
71 |
| - assertThat(result, hasSize(1)); |
| 68 | + assertThat(result, contains(supplementaryDocumentTextDataCheckResponse)); |
72 | 69 | }
|
73 | 70 |
|
74 | 71 | @Test
|
75 | 72 | public void shouldFilterFaceMatchChecks() {
|
76 | 73 | List<FaceMatchCheckResponse> result = testObj.getFaceMatchChecks();
|
77 | 74 |
|
78 |
| - assertThat(result, hasSize(1)); |
| 75 | + assertThat(result, contains(faceMatchCheckResponse)); |
79 | 76 | }
|
80 | 77 |
|
81 | 78 | @Test
|
82 | 79 | public void shouldFilterFaceComparisonChecks() {
|
83 | 80 | List<FaceComparisonCheckResponse> result = testObj.getFaceComparisonChecks();
|
84 | 81 |
|
85 |
| - assertThat(result, hasSize(1)); |
| 82 | + assertThat(result, contains(faceComparisonCheckResponse)); |
86 | 83 | }
|
87 | 84 |
|
88 | 85 | @Test
|
89 | 86 | public void shouldFilterIdDocumentComparisonChecks() {
|
90 | 87 | List<IdDocumentComparisonCheckResponse> result = testObj.getIdDocumentComparisonChecks();
|
91 | 88 |
|
92 |
| - assertThat(result, hasSize(1)); |
| 89 | + assertThat(result, contains(idDocumentComparisonCheckResponse)); |
93 | 90 | }
|
94 | 91 |
|
95 | 92 | @Test
|
96 | 93 | public void shouldFilterThirdPartyIdentityChecks() {
|
97 | 94 | List<ThirdPartyIdentityCheckResponse> result = testObj.getThirdPartyIdentityChecks();
|
98 | 95 |
|
99 |
| - assertThat(result, hasSize(1)); |
| 96 | + assertThat(result, contains(thirdPartyIdentityCheckResponse)); |
100 | 97 | }
|
101 | 98 |
|
102 | 99 | @Test
|
103 | 100 | public void shouldFilterWatchlistScreeningChecks() {
|
104 | 101 | List<WatchlistScreeningCheckResponse> result = testObj.getWatchlistScreeningChecks();
|
105 | 102 |
|
106 |
| - assertThat(result, hasSize(1)); |
| 103 | + assertThat(result, contains(watchlistScreeningCheckResponse)); |
107 | 104 | }
|
108 | 105 |
|
109 | 106 | @Test
|
110 | 107 | public void shouldFilterIbvVisualReviewChecks() {
|
111 | 108 | List<IbvVisualReviewCheckResponse> result = testObj.getIbvVisualReviewChecks();
|
112 | 109 |
|
113 |
| - assertThat(result, hasSize(1)); |
| 110 | + assertThat(result, contains(ibvVisualReviewCheckResponse)); |
114 | 111 | }
|
115 | 112 |
|
116 | 113 | @Test
|
117 | 114 | public void shouldFilterDocumentSchemeValidityChecks() {
|
118 | 115 | List<DocumentSchemeValidityCheckResponse> result = testObj.getDocumentSchemeValidityChecks();
|
119 | 116 |
|
120 |
| - assertThat(result, hasSize(1)); |
| 117 | + assertThat(result, contains(documentSchemeValidityCheckResponse)); |
121 | 118 | }
|
122 | 119 |
|
123 | 120 | @Test
|
124 | 121 | public void shouldFilterProfileDocumentMatchChecks() {
|
125 | 122 | List<ProfileDocumentMatchCheckResponse> result = testObj.getProfileDocumentMatchChecks();
|
126 | 123 |
|
127 |
| - assertThat(result, hasSize(1)); |
| 124 | + assertThat(result, contains(profileDocumentMatchCheckResponse)); |
128 | 125 | }
|
129 | 126 |
|
130 | 127 | @Test
|
131 | 128 | public void shouldFilterThirdPartyIdentityFraudOneCheck() {
|
132 | 129 | List<ThirdPartyIdentityFraudOneCheckResponse> result = testObj.getThirdPartyIdentityFraudOneChecks();
|
133 | 130 |
|
134 |
| - assertThat(result, hasSize(1)); |
| 131 | + assertThat(result, contains(thirdPartyIdentityFraudOneCheckResponse)); |
135 | 132 | }
|
136 | 133 |
|
137 | 134 | @Test
|
138 | 135 | public void shouldFilterSynecticsIdentityFraudCheck() {
|
139 | 136 | List<SynecticsIdentityFraudCheckResponse> result = testObj.getSynecticsIdentityFraudChecks();
|
140 | 137 |
|
141 |
| - assertThat(result, hasSize(1)); |
| 138 | + assertThat(result, contains(synecticsIdentityFraudCheckResponse)); |
142 | 139 | }
|
143 | 140 |
|
144 | 141 | private void setupGetSessionResult() {
|
|
0 commit comments