public void CheckFile_GoodFile_Success() { using (TempFile t = new TempFile("1+1")) { p.CheckFile(t.FileName); } }
public void LogErrors_WritesFormattedErrors() { using (TempFile t = new TempFile("\n$$$")) { p.Run(new string[] { t.FileName} ); Assert.Equal(p.Analyzer.Errors.Select(e => p.Analyzer.FormatError(e)).ToList(), p.LoggedErrors); } }
public void Analyzer_FormatError_IncludesFilename() { using (TempFile t = new TempFile("+")) { a.LoadFile(t.FileName); string message = a.FormatError(a.Errors.First()); Assert.True(message.StartsWith(t.FileName)); } }