-
Notifications
You must be signed in to change notification settings - Fork 4
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
Showing
14 changed files
with
96 additions
and
20 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
25 changes: 25 additions & 0 deletions
25
Yoti.Auth.Sandbox.Tests/DocScan/Request/Check/SandboxThirdPartyIdentityCheckBuilderTests.cs
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,25 @@ | ||
using System; | ||
using Xunit; | ||
using Yoti.Auth.Sandbox.DocScan.Request.Check; | ||
using Yoti.Auth.Sandbox.DocScan.Request.Check.Report; | ||
|
||
namespace Yoti.Auth.Sandbox.Tests.DocScan.Request.Check | ||
{ | ||
public class SandboxThirdPartyIdentityCheckBuilderTests | ||
{ | ||
private readonly SandboxBreakdown _someBreakDown = new SandboxBreakdown("someSubCheck", "someResult", details: null); | ||
|
||
[Fact] | ||
public void ShouldNotBuildWithoutRecommendation() | ||
{ | ||
var exception = Assert.Throws<ArgumentNullException>(() => | ||
{ | ||
new SandboxDocumentFaceMatchCheckBuilder() | ||
.WithBreakdown(_someBreakDown) | ||
.Build(); | ||
}); | ||
|
||
Assert.Contains("Recommendation", exception.Message, StringComparison.Ordinal); | ||
} | ||
} | ||
} |
3 changes: 0 additions & 3 deletions
3
Yoti.Auth.Sandbox.Tests/DocScan/Request/Task/SandboxDocumentTextDataExtractionReasonTests.cs
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
3 changes: 1 addition & 2 deletions
3
Yoti.Auth.Sandbox.Tests/DocScan/Request/Task/SandboxTaskResultsBuilderTests.cs
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
10 changes: 10 additions & 0 deletions
10
Yoti.Auth.Sandbox/DocScan/Request/Check/SandboxThirdPartyIdentityCheck.cs
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,10 @@ | ||
namespace Yoti.Auth.Sandbox.DocScan.Request.Check | ||
{ | ||
public class SandboxThirdPartyIdentityCheck : SandboxCheck | ||
{ | ||
public SandboxThirdPartyIdentityCheck(SandboxCheckResult result) | ||
: base(result) | ||
{ | ||
} | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
Yoti.Auth.Sandbox/DocScan/Request/Check/SandboxThirdPartyIdentityCheckBuilder.cs
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,16 @@ | ||
namespace Yoti.Auth.Sandbox.DocScan.Request.Check | ||
{ | ||
public class SandboxThirdPartyIdentityCheckBuilder | ||
: SandboxCheckBuilder<SandboxThirdPartyIdentityCheckBuilder, SandboxThirdPartyIdentityCheck> | ||
{ | ||
public override SandboxThirdPartyIdentityCheck Build() | ||
{ | ||
Validation.NotNull(Recommendation, nameof(Recommendation)); | ||
|
||
SandboxCheckReport report = new SandboxCheckReport(Recommendation, Breakdown); | ||
SandboxCheckResult result = new SandboxCheckResult(report); | ||
|
||
return new SandboxThirdPartyIdentityCheck(result); | ||
} | ||
} | ||
} |
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