protected void NoException(string code) { var document = CreateDocumentFromCode(code); var diagnostics = GetDiagnostics(document); var diagnostic = diagnostics.FirstOrDefault(d => d.Id == "AD0001"); if (diagnostic != null) { throw RoslynTestKitException.ExceptionInAnalyzer(diagnostic); } }
protected void NoException(string code) { var document = MarkupHelper.GetDocumentFromCode(code, LanguageName, References); var diagnostics = GetDiagnostics(document); var diagnostic = diagnostics.FirstOrDefault(d => d.Id == "AD0001"); if (diagnostic != null) { throw RoslynTestKitException.ExceptionInAnalyzer(diagnostic); } }