/** * Returns canonical path for the file with the given file name. * The path is formed base on the non-compilable resources location. * This implementation uses 'src/test/resources-noncompilable/com/puppycrawl/tools/checkstyle/' * as a non-compilable resource location. * @param filename file name. * @return canonical path for the file with the given file name. * @throws IOException if I/O exception occurs while forming the path. */ protected final String getNonCompilablePath(String filename) throws IOException { return new File("src/test/resources-noncompilable/" + getPackageLocation() + "/" + filename).getCanonicalPath(); }
/** * Returns URI-representation of the path for the given file name. * The path is formed base on the root location. * This implementation uses 'src/test/resources/com/puppycrawl/tools/checkstyle/' * as a root location. * @param filename file name. * @return URI-representation of the path for the file with the given file name. */ protected final String getUriString(String filename) { return new File("src/test/resources/" + getPackageLocation() + "/" + filename).toURI() .toString(); }