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); }
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"); }