TestUtil (Apache Geode 1.7.0)
Date: 2018-09-27

org.apache.geode.util.test

## Class TestUtil

- java.lang.Object
- - org.apache.geode.util.test.TestUtil

-     public class TestUtil
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TestUtil()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `getResourcePath(java.lang.Class<?> clazz, java.lang.String name)` Return the path to a named resource.
    `static java.lang.String` | `getResourcePath(java.lang.ClassLoader classLoader, java.lang.String name)` Return the path to a named resource.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TestUtil

          public TestUtil()

  - ### Method Detail

    - #### getResourcePath

          public static java.lang.String getResourcePath(java.lang.Class<?> clazz,
                                                         java.lang.String name)

      Return the path to a named resource. This finds the resource on the classpath using the rules of class.getResource. For a relative path it will look in the same package as the class, for an absolute path it will start from the base package. Best practice is to put the resource in the same package as your test class and load it with this method.
      Parameters:
        `clazz` - the class to look relative too
        `name` - the name of the resource, eg "cache.xml"

    - #### getResourcePath

          public static java.lang.String getResourcePath(java.lang.ClassLoader classLoader,
                                                         java.lang.String name)

      Return the path to a named resource. This finds the resource on the classpath using the rules of ClassLoader.getResource.
      Parameters:
        `classLoader` - the ClassLoader to look up resource in
        `name` - the name of the resource, eg "cache.xml"