Class TestUtils
java.lang.Object
org.sonar.java.checks.verifier.TestUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.sonar.api.batch.fs.InputFileemptyInputFile(String filename) static org.sonar.api.batch.fs.InputFileemptyInputFile(String filename, org.sonar.api.batch.fs.InputFile.Type type) static org.sonar.api.batch.fs.InputFilestatic org.sonar.api.batch.fs.InputFilestatic org.sonar.api.batch.fs.InputFilestatic StringmainCodeSourcesPath(String path) To be used when testing rules targeting MAIN code.static StringmainCodeSourcesPathInModule(TestClasspathUtils.Module module, String path) To be used when testing rules targeting MAIN code from a non-default module.static StringTo be used when testing rules behavior when bytecode is missing, partial, or code does not compile.static StringTo be used when testing rules behavior when bytecode is missing, partial, or code does not compile.static StringtestCodeSourcesPath(String path) To be used when testing rules targeting TEST code.static StringtestCodeSourcesPathInModule(TestClasspathUtils.Module module, String path) To be used when testing rules targeting TEST code from a non-default module.
-
Method Details
-
mainCodeSourcesPath
-
mainCodeSourcesPathInModule
To be used when testing rules targeting MAIN code from a non-default module. -
testCodeSourcesPath
-
testCodeSourcesPathInModule
To be used when testing rules targeting TEST code from a non-default module. -
nonCompilingTestSourcesPath
-
nonCompilingTestSourcesPathInModule
public static String nonCompilingTestSourcesPathInModule(TestClasspathUtils.Module module, String path) To be used when testing rules behavior when bytecode is missing, partial, or code does not compile. And the file is in a non-default module. -
emptyInputFile
-
emptyInputFile
public static org.sonar.api.batch.fs.InputFile emptyInputFile(String filename, org.sonar.api.batch.fs.InputFile.Type type) -
inputFile
-
inputFile
-
inputFile
-