|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.pentaho.di.TestUtilities
public class TestUtilities
| Constructor Summary | |
|---|---|
TestUtilities()
|
|
| Method Summary | |
|---|---|
static void |
checkRows(List<RowMetaAndData> rows1,
List<RowMetaAndData> rows2)
Check the 2 lists comparing the rows in order. |
static void |
checkRows(List<RowMetaAndData> rows1,
List<RowMetaAndData> rows2,
int fileNameColumn)
Check the 2 lists comparing the rows in order. |
static StepMeta |
createDummyStep(String name,
PluginRegistry pluginRegistry)
Creates a dummy |
static String |
createEmptyTempFile(String fileName)
Create an empty temp file and return it's absolute path. |
static String |
createEmptyTempFile(String fileName,
String suffix)
Create an empty temp file and return it's absolute path. |
static StepMeta |
createInjectorStep(String name,
PluginRegistry pluginRegistry)
Create an injector step. |
static StepMeta |
createSortRowsStep(String name,
String[] sortFields,
boolean[] ascending,
boolean[] caseSensitive,
String directory,
int sortSize,
PluginRegistry pluginRegistry)
Create and return a SortRows step. |
static String |
createTempFolder(String folderName)
Creates a the folder folderName under the java io temp directory. |
static String |
getEndOfLineCharacters()
Return the end of line character based on value returned by getFileFormat. |
static String |
getFileFormat()
Return the file format based on the OS type. |
static String |
now()
Returns the current date using this classes DATE_FORMAT_NOW format string. |
static String |
writeTextFile(String folderName,
String fileName,
String delimiter)
Write the file to be used as input (as a temporary file). |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TestUtilities()
| Method Detail |
|---|
public static String getEndOfLineCharacters()
public static String getFileFormat()
public static void checkRows(List<RowMetaAndData> rows1,
List<RowMetaAndData> rows2)
throws TestFailedException
rows1 - set 1 of rows to comparerows2 - set 2 of rows to compare
TestFailedException
public static void checkRows(List<RowMetaAndData> rows1,
List<RowMetaAndData> rows2,
int fileNameColumn)
throws TestFailedException
rows1 - set 1 of rows to comparerows2 - set 2 of rows to comparefileNameColumn - Number of the column containing the filename. This is only checked
for being non-null (some systems maybe canonize names differently
than we input).
TestFailedException
public static StepMeta createDummyStep(String name,
PluginRegistry pluginRegistry)
name - pluginRegistry -
public static StepMeta createInjectorStep(String name,
PluginRegistry pluginRegistry)
name - registry -
public static String createEmptyTempFile(String fileName)
throws IOException
fileName -
IOException
public static String createEmptyTempFile(String fileName,
String suffix)
throws IOException
fileName - suffix - A suffix to add at the end of the file name
IOExceptionpublic static String createTempFolder(String folderName)
folderName -
public static String now()
public static String writeTextFile(String folderName,
String fileName,
String delimiter)
throws IOException
IOException - UPON
public static StepMeta createSortRowsStep(String name,
String[] sortFields,
boolean[] ascending,
boolean[] caseSensitive,
String directory,
int sortSize,
PluginRegistry pluginRegistry)
name - sortFields[] - Fields to sort byascending[] - Boolean indicating whether the corresponding field is to be sorted in ascending or descending order.caseSensitive[] - Boolean indicating whether the corresponding field is to have case as a factor in the sort.directory - The directory in the file system where the sort is to take place if it can't fit into memory?sortSize - ???pluginRegistry - The environment's Kettle plugin registry.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||