java.lang.Object
pro.verron.officestamper.test.TestUtils

public class TestUtils extends Object
A utility class for testing. Provides methods for retrieving InputStreams from specified resource paths. Typically used for accessing test resources.
  • Constructor Details

    • TestUtils

      public TestUtils()
  • Method Details

    • getResource

      public static InputStream getResource(String path)
      Retrieves an InputStream for the specified resource path.
      Parameters:
      path - the path of the resource
      Returns:
      an InputStream for the specified resource
    • getResource

      public static InputStream getResource(Path path)
      Retrieves an InputStream for the specified resource path.
      Parameters:
      path - the path of the resource
      Returns:
      an InputStream for the specified resource
    • makeResource

      public static InputStream makeResource(String content) throws org.docx4j.openpackaging.exceptions.Docx4JException, IOException
      Throws:
      org.docx4j.openpackaging.exceptions.Docx4JException
      IOException