com.atlassian.crowd.acceptance.utils
Class AcceptanceTestHelper

java.lang.Object
  extended by com.atlassian.crowd.acceptance.utils.AcceptanceTestHelper

public class AcceptanceTestHelper
extends java.lang.Object

User: Justin Date: 12/03/2007


Constructor Summary
AcceptanceTestHelper()
           
 
Method Summary
protected static java.io.File copyIntoTemporaryFile(java.lang.String source, java.lang.String fileName)
          creates a temp file with a given filename from an input stream in the classpath or a file in the filesystem
static java.io.File generateAttachment(java.lang.String filename, java.lang.String text)
           
static java.io.File generateLargeAttachment(java.lang.String filename, long bytes)
           
static java.io.File getResource(java.lang.String fileName)
           
static java.io.InputStream getResourceAsStream(java.lang.String fileName)
           
static java.lang.String getTestResourcesLocation()
           
protected static java.io.File loadFileFromClasspath(java.lang.String source)
           
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
 

Constructor Detail

AcceptanceTestHelper

public AcceptanceTestHelper()
Method Detail

loadFileFromClasspath

protected static java.io.File loadFileFromClasspath(java.lang.String source)
                                             throws java.lang.Exception
Throws:
java.lang.Exception

generateLargeAttachment

public static java.io.File generateLargeAttachment(java.lang.String filename,
                                                   long bytes)

generateAttachment

public static java.io.File generateAttachment(java.lang.String filename,
                                              java.lang.String text)

copyIntoTemporaryFile

protected static java.io.File copyIntoTemporaryFile(java.lang.String source,
                                                    java.lang.String fileName)
                                             throws java.lang.Exception
creates a temp file with a given filename from an input stream in the classpath or a file in the filesystem

Parameters:
fileName -
Returns:
Throws:
java.io.IOException
java.lang.Exception

getTestResourcesLocation

public static java.lang.String getTestResourcesLocation()

getResourceAsStream

public static java.io.InputStream getResourceAsStream(java.lang.String fileName)
                                               throws java.lang.Exception
Throws:
java.lang.Exception

getResource

public static java.io.File getResource(java.lang.String fileName)

loadProperties

public static java.util.Properties loadProperties(java.lang.String fileName)


Copyright © 2010 Atlassian. All Rights Reserved.