예제 #1
0
        public void CodeGenerateUpdateNeededTest()
        {
            IanaOrgTlds tldHash   = CodeSignatureService.GetIanaOrgTldsFromJson();
            IanaOrgTlds tldLatest = TldDataUpdater.FetchTlds();

#if DEBUG
            TldDataUpdater tldDataUpdater = new(Output.BuildLoggerFor <TldDataUpdater>());
            tldDataUpdater.Rebuild();
#endif
            Assert.Equal(tldHash.Hash, tldLatest.Hash);
        }
예제 #2
0
        public void FetchTopLevelDomainsTest()
        {
            IanaOrgTlds ianaOrgTlds = TldDataUpdater.FetchTlds();

            Output.WriteLine($"Fetched {ianaOrgTlds.List.Count} items");
            Assert.True(condition: ianaOrgTlds.List.Any());
            Assert.Contains(ianaOrgTlds.List, x => x == "COM");
            Assert.Contains(ianaOrgTlds.List, x => x == "NET");
            Assert.Contains(ianaOrgTlds.List, x => x == "ORG");
            Assert.Contains(ianaOrgTlds.List, x => x == "EDU");
            Assert.Contains(ianaOrgTlds.List, x => x == "GOV");
            Assert.Contains(ianaOrgTlds.List, x => x == "MIL");
        }