Exemplo n.º 1
0
 public void CheckFile_GoodFile_Success()
 {
     using (TempFile t = new TempFile("1+1"))
     {
         p.CheckFile(t.FileName);
     }
 }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
0
 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));
     }
 }