Class TestResource<T>
- java.lang.Object
- 
- com.atlassian.confluence.util.test.rules.TestResource<T>
 
- 
- Type Parameters:
- T- the type of the resource to load
 - All Implemented Interfaces:
- org.junit.rules.TestRule
 - Direct Known Subclasses:
- XmlResource
 
 @Deprecated public abstract class TestResource<T> extends Object implements org.junit.rules.TestRule Deprecated.since 7.20 no replacementLoad a resource via the defining ClassLoader of the given test class.By default, a resource is located relative to the class, meaning it has to reside in the same folder. - Since:
- 5.4
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected StringnameSuffixDeprecated.protected ClasstestClassDeprecated.
 - 
Constructor SummaryConstructors Constructor Description TestResource(Class testClass, String nameSuffix)Deprecated.
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.junit.runners.model.Statementapply(org.junit.runners.model.Statement statement, org.junit.runner.Description description)Deprecated.Tget()Deprecated.protected abstract Tload(InputStream testResourceStream)Deprecated.protected StringtoFileName(String testMethodName)Deprecated.Composes the file name of the resource based upon a hyphenated version of the test class and method name and the given name suffix.protected StringtoRelativePathFromClassLoaderRoot(Method testMethod)Deprecated.
 
- 
- 
- 
Method Detail- 
applypublic final org.junit.runners.model.Statement apply(org.junit.runners.model.Statement statement, org.junit.runner.Description description)Deprecated.- Specified by:
- applyin interface- org.junit.rules.TestRule
 
 - 
loadprotected abstract T load(InputStream testResourceStream) Deprecated.
 - 
toRelativePathFromClassLoaderRootprotected String toRelativePathFromClassLoaderRoot(Method testMethod) Deprecated.
 - 
toFileNameprotected String toFileName(String testMethodName) Deprecated.Composes the file name of the resource based upon a hyphenated version of the test class and method name and the given name suffix.Example: {@code public class VersionedTemplateTest {
 - 
getpublic T get() Deprecated.
 
- 
 
-