com.atlassian.confluence
Class AcceptanceTestHelper
java.lang.Object
com.atlassian.confluence.AcceptanceTestHelper
public class AcceptanceTestHelper
- extends java.lang.Object
Field Summary |
static org.apache.log4j.Category |
LOG
|
Method Summary |
static java.io.File |
generateAttachment(java.lang.String filename,
java.lang.String text)
|
static java.io.File |
generateLargeAttachment(java.lang.String filename,
long bytes)
|
protected static java.lang.String |
getPropertyValue(java.lang.String k,
java.lang.String v,
java.util.Properties p)
Retrieves a property value, replacing values like ${token} using the Properties to look them up. |
static java.io.File |
getTempDirectory()
|
static java.io.File |
getTempFileDir()
|
static java.io.File |
loadFileFromClasspath(java.lang.String resourceName)
|
static java.util.Properties |
loadProperties(java.lang.String fileName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOG
public static final org.apache.log4j.Category LOG
AcceptanceTestHelper
public AcceptanceTestHelper()
loadFileFromClasspath
public static java.io.File loadFileFromClasspath(java.lang.String resourceName)
- Returns:
- a File containing the contents of the classpath resource.
- Throws:
java.lang.RuntimeException
- if an error occurred copying the classpath resource to a temporary location
generateLargeAttachment
public static java.io.File generateLargeAttachment(java.lang.String filename,
long bytes)
getTempFileDir
public static java.io.File getTempFileDir()
generateAttachment
public static java.io.File generateAttachment(java.lang.String filename,
java.lang.String text)
getTempDirectory
public static java.io.File getTempDirectory()
loadProperties
public static java.util.Properties loadProperties(java.lang.String fileName)
getPropertyValue
protected static java.lang.String getPropertyValue(java.lang.String k,
java.lang.String v,
java.util.Properties p)
- Retrieves a property value, replacing values like ${token} using the Properties to look them up.
It will leave unresolved properties alone, trying for System properties, and implements reparsing (in the case
that the value of a property contains a key), and will not loop endlessly on a pair like test = ${test}.
Copyright © 2003-2008 Atlassian Pty Ltd. All Rights Reserved.