Пример #1
0
        public async Task PositiveTestScan()
        {
            var client = new AntivirusClient(this.Settings.AccessKey, false);
            var result = await client.ScanFile(GetSampleFilePath());

            Assert.That(result.HasVirus, Is.EqualTo(false));
        }
Пример #2
0
        public void HandlingInvalidKeyExceptionTest()
        {
            var client = new AntivirusClient("invalidkey", false);
            var ex     = Assert.ThrowsAsync <FileScanException>(async() =>
            {
                var result = await client.ScanFile(GetSampleFilePath());
            });

            Assert.That(ex.Message.StartsWith("Authorisation error: "));
        }