Beispiel #1
0
        public void FromCurrentFileError()
        {
            var fileName = "X.X.current";

            CoverageHelper.CurrentCoverage = 12.34;

            using (var file = File.Create(fileName))
            {
                file.Write(new byte[] { 0x01, 0x02, 0x03 });
                file.Close();
            }

            var log = FuzzerLog.FromCurrentFile(fileName, new Exception("Test"), "log123");

            File.Delete(fileName);

            Assert.AreEqual(Guid.Empty, log.InputId);
            Assert.AreEqual(Guid.Empty, log.ConfigId);
            Assert.AreEqual(12.34D, log.Coverage);

            CheckLogError(fileName, log.Error);
        }