MCPcopy Index your code
hub / github.com/HtmlUnit/htmlunit / getFileContent

Method getFileContent

src/test/java/org/htmlunit/WebTestCase.java:551–555  ·  view source on GitHub ↗

Read the content of the given file using our classloader. @param fileName the file name @return the content as string @throws IOException in case of error

(final String fileName)

Source from the content-addressed store, hash-verified

549 * @throws IOException in case of error
550 */
551 protected String getFileContent(final String fileName) throws IOException {
552 final InputStream stream = getClass().getClassLoader().getResourceAsStream(fileName);
553 assertNotNull(fileName, stream);
554 return IOUtils.toString(stream, ISO_8859_1);
555 }
556
557 protected void compareImages(final String expected, final String current) throws IOException {
558 final String currentBase64Image = current.split(",")[1];

Callers 2

testScriptStackTraceMethod · 0.80
eventCoordinatesMethod · 0.80

Calls 3

assertNotNullMethod · 0.95
getClassMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected