public void ShouldBuildWithManualCheckNever() { RequestedDocumentAuthenticityCheck check = new RequestedDocumentAuthenticityCheckBuilder() .WithManualCheckNever() .Build(); Assert.AreEqual("NEVER", check.Config.ManualCheck); }
public void ShouldBuildWithManualCheckFallback() { RequestedDocumentAuthenticityCheck check = new RequestedDocumentAuthenticityCheckBuilder() .WithManualCheckFallback() .Build(); Assert.AreEqual("FALLBACK", check.Config.ManualCheck); }
public void ShouldBuildWithIssuingAuthoritySubCheckToGiveDefaultObject() { RequestedDocumentAuthenticityCheck check = new RequestedDocumentAuthenticityCheckBuilder() .WithIssuingAuthoritySubCheck() .Build(); Assert.IsTrue(check.Config.IssuingAuthoritySubCheck.Requested); Assert.IsNull(check.Config.IssuingAuthoritySubCheck.Filter); }
public void ShouldBuildWithIssuingAuthoritySubCheck() { var filter = new OrthogonalRestrictionsFilterBuilder() .WithExcludedCountries(new List <string> { "GBR", "FRA" }) .WithExcludedDocumentTypes(new List <string> { "PASSPORT", "STATE_ID" }) .Build(); RequestedDocumentAuthenticityCheck check = new RequestedDocumentAuthenticityCheckBuilder() .WithIssuingAuthoritySubCheck(filter) .Build(); Assert.IsTrue(check.Config.IssuingAuthoritySubCheck.Requested); Assert.IsNotNull(check.Config.IssuingAuthoritySubCheck.Filter); Assert.AreEqual(filter, check.Config.IssuingAuthoritySubCheck.Filter); }
public void ShouldBuildWithIssuingAuthoritySubCheckVariation() { var filter = new DocumentRestrictionsFilterBuilder() .ForIncludeList() .WithDocumentRestriction( new List <string> { "USA" }, new List <string> { "PASSPORT" }) .Build(); RequestedDocumentAuthenticityCheck check = new RequestedDocumentAuthenticityCheckBuilder() .WithIssuingAuthoritySubCheck(filter) .Build(); Assert.IsTrue(check.Config.IssuingAuthoritySubCheck.Requested); Assert.IsNotNull(check.Config.IssuingAuthoritySubCheck.Filter); Assert.AreEqual(filter, check.Config.IssuingAuthoritySubCheck.Filter); }