Пример #1
0
    public async Task UrlScanBatchLimit()
    {
        VirusTotal.RestrictNumberOfResources = false;

        IEnumerable <UrlScanResult> results = await VirusTotal.ScanUrlsAsync(TestData.GetUnknownUrls(50));

        //We only expect 25 as VT simply returns 25 results no matter the batch size.
        Assert.Equal(VirusTotal.UrlScanBatchSizeLimit, results.Count());
    }
Пример #2
0
    public async Task ScanMultipleUnknownUrl()
    {
        IEnumerable <UrlScanResult> urlScans = await VirusTotal.ScanUrlsAsync(TestData.GetUnknownUrls(5));

        foreach (UrlScanResult urlScan in urlScans)
        {
            Assert.Equal(UrlScanResponseCode.Queued, urlScan.ResponseCode);
        }
    }