Class TestUtils

java.lang.Object
org.sonar.java.checks.verifier.TestUtils

public class TestUtils extends Object
  • Method Details

    • testSourcesPath

      @Deprecated(forRemoval=true) public static String testSourcesPath(String path)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • mainCodeSourcesPath

      public static String mainCodeSourcesPath(String path)
      To be used when testing rules targeting MAIN code.
    • testCodeSourcesPath

      public static String testCodeSourcesPath(String path)
      To be used when testing rules targeting TEST code.
    • nonCompilingTestSourcesPath

      public static String nonCompilingTestSourcesPath(String path)
      To be used when testing rules behavior when bytecode is missing, partial, or code does not compile.
    • emptyInputFile

      public static org.sonar.api.batch.fs.InputFile emptyInputFile(String filename)
    • emptyInputFile

      public static org.sonar.api.batch.fs.InputFile emptyInputFile(String filename, org.sonar.api.batch.fs.InputFile.Type type)
    • inputFile

      public static org.sonar.api.batch.fs.InputFile inputFile(String filepath)
    • inputFile

      public static org.sonar.api.batch.fs.InputFile inputFile(File file)
    • inputFile

      public static org.sonar.api.batch.fs.InputFile inputFile(String moduleKey, File file)