public async Task RescanMultipleKnownFile() { IEnumerable <RescanResult> fileResult = await VirusTotal.RescanFilesAsync(TestData.KnownHashes); foreach (RescanResult rescanResult in fileResult) { //It should always be in the VirusTotal database. We expect it to rescan it Assert.Equal(RescanResponseCode.Queued, rescanResult.ResponseCode); } }
public async Task RescanBatchLimit() { IgnoreMissingJson("[array] / Permalink", "[array] / scan_id", "[array] / SHA256"); VirusTotal.RestrictNumberOfResources = false; IEnumerable <RescanResult> results = await VirusTotal.RescanFilesAsync(TestData.GetRandomSHA1s(50)); //We only expect 25 as VT simply returns 25 results no matter the batch size. Assert.Equal(VirusTotal.RescanBatchSizeLimit, results.Count()); }