Esempio n. 1
0
        public async Task RescanSmallFile()
        {
            RescanResult fileResult = await VirusTotal.RescanFileAsync(new byte[1]);

            //It has been scanned before, we expect it to return queued.
            Assert.Equal(RescanResponseCode.Queued, fileResult.ResponseCode);
        }
Esempio n. 2
0
        public async Task RescanKnownFile()
        {
            RescanResult fileResult = await VirusTotal.RescanFileAsync(TestData.EICARMalware);

            //It should always be in the VirusTotal database. We expect it to rescan it
            Assert.Equal(RescanResponseCode.Queued, fileResult.ResponseCode);
        }
Esempio n. 3
0
        public async Task RescanUnknownFile()
        {
            IgnoreMissingJson(" / Permalink", " / scan_id", " / SHA256");

            RescanResult fileResult = await VirusTotal.RescanFileAsync(TestData.GetRandomSHA1s(1).First());

            //It should not be in the VirusTotal database already, which means it should return error.
            Assert.Equal(RescanResponseCode.ResourceNotFound, fileResult.ResponseCode);
        }