org.apache.maven.shared.utils.testhelpers
Class FileTestHelper

java.lang.Object
  extended by org.apache.maven.shared.utils.testhelpers.FileTestHelper

public final class FileTestHelper
extends Object

A few utility methods for file based tests


Method Summary
static void createLineBasedFile(File file, String[] data)
           
static void generateTestData(OutputStream out, long size)
           
static void generateTestFile(File testfile, int size)
           
static File newFile(org.junit.rules.TemporaryFolder folder, String filename)
          Check if the given file exists in the given folder and remove it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

generateTestData

public static void generateTestData(OutputStream out,
                                    long size)
                             throws IOException
Throws:
IOException

generateTestFile

public static void generateTestFile(File testfile,
                                    int size)
                             throws IOException
Throws:
IOException

createLineBasedFile

public static void createLineBasedFile(File file,
                                       String[] data)
                                throws IOException
Throws:
IOException

newFile

public static File newFile(org.junit.rules.TemporaryFolder folder,
                           String filename)
                    throws IOException
Check if the given file exists in the given folder and remove it.

Returns:
the File object for a new file
Throws:
IOException


Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.