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