public void TestDownloadBundle() { AnchorBundleDownloader downloader = new AnchorBundleDownloader(); downloader.MaxRetries = 1; AnchorBundle bundle = null; Assert.DoesNotThrow(() => bundle = downloader.Download(new Uri(PatientTestBundleUrl))); Assert.True(!bundle.Certificates.IsNullOrEmpty()); }
/// <summary> /// Construct a new BundleAnchorIndex /// </summary> /// <param name="settings">Construct index based on these settings</param> /// <param name="incoming">Retrieve incoming or outgoing anchors</param> public BundleAnchorIndex(BundleResolverSettings settings, bool incoming) { m_clientSettings = settings.ClientSettings; m_incoming = incoming; m_downloader = new AnchorBundleDownloader(); m_downloader.VerifySSL = settings.VerifySSL; m_downloader.TimeoutMS = settings.TimeoutMilliseconds; m_downloader.MaxRetries = settings.MaxRetries; }
public void TestDownloadCerts() { AnchorBundleDownloader downloader = new AnchorBundleDownloader(); downloader.MaxRetries = 1; X509Certificate2Collection bundle = null; Assert.DoesNotThrow(() => bundle = downloader.DownloadCertificates(new Uri(PatientTestBundleUrl))); Assert.True(!bundle.IsNullOrEmpty()); }