Skip to content

Latest commit

 

History

History

test-xml-parsing

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

SonarSource Analyzers XML Parsing Test Commons

To test a check for XML file

Use SonarXmlCheckVerifier:

SonarXmlCheckVerifier.verifyIssueOnFile("file.xml", new FileTestCheck(), "File level message", 1, 2);

You can use comments notation from test-commons to assert issues information.

SonarXmlCheckVerifier.verifyIssues("checkTestFile.xml", testCheck);

❗ Tested XML files should be in directory src/test/java/resources/checks/<CheckClassName>

License

Copyright 2009-2023 SonarSource. Licensed under the GNU Lesser General Public License, Version 3.0