コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }