File tree Expand file tree Collapse file tree 3 files changed +41
-1
lines changed
main/java/com/yoti/api/client/sandbox/docs/request/check
test/java/com/yoti/api/client/sandbox/docs/request/check Expand file tree Collapse file tree 3 files changed +41
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ public static SandboxZoomLivenessCheckBuilder forZoomLiveness() {
16
16
return new SandboxZoomLivenessCheckBuilder ();
17
17
}
18
18
19
+ public static SandboxStaticLivenessCheckBuilder forStaticLiveness () { return new SandboxStaticLivenessCheckBuilder (); }
20
+
19
21
public String getLivenessType () {
20
22
return livenessType ;
21
23
}
Original file line number Diff line number Diff line change
1
+ package com .yoti .api .client .sandbox .docs .request .check ;
2
+
3
+ import static com .yoti .api .client .spi .remote .util .Validation .notNull ;
4
+
5
+ import com .yoti .api .client .docs .DocScanConstants ;
6
+ import com .yoti .api .client .sandbox .docs .request .check .report .SandboxCheckReport ;
7
+
8
+ public class SandboxStaticLivenessCheckBuilder extends SandboxCheck .Builder <SandboxStaticLivenessCheckBuilder > {
9
+
10
+ SandboxStaticLivenessCheckBuilder () {
11
+ }
12
+
13
+ @ Override
14
+ protected SandboxStaticLivenessCheckBuilder self () {
15
+ return this ;
16
+ }
17
+
18
+ @ Override
19
+ public SandboxLivenessCheck build () {
20
+ notNull (recommendation , "recommendation" );
21
+
22
+ SandboxCheckReport report = new SandboxCheckReport (recommendation , breakdown );
23
+ SandboxCheckResult result = new SandboxCheckResult (report );
24
+
25
+ return new SandboxLivenessCheck (result , DocScanConstants .STATIC );
26
+ }
27
+
28
+ }
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ public void builder_shouldBuildWithCorrectValues() {
45
45
}
46
46
47
47
@ Test
48
- public void builder_shouldSetCorrectLivenessType () {
48
+ public void builder_shouldSetCorrectLivenessTypeForZoom () {
49
49
SandboxLivenessCheck result = new SandboxZoomLivenessCheckBuilder ()
50
50
.withRecommendation (sandboxRecommendationMock )
51
51
.withBreakdown (sandboxBreakdownMock )
@@ -54,4 +54,14 @@ public void builder_shouldSetCorrectLivenessType() {
54
54
assertThat (result .getLivenessType (), is ("ZOOM" ));
55
55
}
56
56
57
+ @ Test
58
+ public void builder_shouldSetCorrectLivenessTypeForStatic () {
59
+ SandboxLivenessCheck result = new SandboxStaticLivenessCheckBuilder ()
60
+ .withRecommendation (sandboxRecommendationMock )
61
+ .withBreakdown (sandboxBreakdownMock )
62
+ .build ();
63
+
64
+ assertThat (result .getLivenessType (), is ("STATIC" ));
65
+ }
66
+
57
67
}
You can’t perform that action at this time.
0 commit comments