public async Task BaseUrlIsSet() { var downloader = new XRefMapDownloader(); var xrefs = await downloader.DownloadAsync(new Uri("https://dotnet.github.io/docfx/xrefmap.yml")) as XRefMap; Assert.NotNull(xrefs); Assert.Equal("https://dotnet.github.io/docfx/", xrefs.BaseUrl); }
public async Task BaseUrlIsSet() { var downloader = new XRefMapDownloader(); var xrefs = await downloader.DownloadAsync(new Uri("https://dotnet.github.io/docfx/xrefmap.yml")) as XRefMap; Assert.NotNull(xrefs); Assert.Equal("https://dotnet.github.io/docfx/", xrefs.BaseUrl); var reader = xrefs.GetReader(); Assert.Equal("https://dotnet.github.io/docfx/api/Microsoft.DocAsCode.AssemblyLicenseAttribute.html", reader.Find("Microsoft.DocAsCode.AssemblyLicenseAttribute").Href); }
public async Task BaseUrlIsSet() { // GitHub doesn't support TLS 1.1 since Feb 23, 2018. See: https://github.com/blog/2507-weak-cryptographic-standards-removed ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12; var downloader = new XRefMapDownloader(); var xrefs = await downloader.DownloadAsync(new Uri("https://dotnet.github.io/docfx/xrefmap.yml")) as XRefMap; Assert.NotNull(xrefs); Assert.Equal("https://dotnet.github.io/docfx/", xrefs.BaseUrl); var reader = xrefs.GetReader(); Assert.Equal("https://dotnet.github.io/docfx/api/Microsoft.DocAsCode.AssemblyLicenseAttribute.html", reader.Find("Microsoft.DocAsCode.AssemblyLicenseAttribute").Href); }