org.specrunner.junit
Class JUnitUtils

java.lang.Object
  extended by org.specrunner.junit.JUnitUtils

public final class JUnitUtils
extends Object

JUnit useful functions.

Author:
Thiago Santos

Field Summary
static String PATH
          Output path.
 
Method Summary
static File getFile(Class<?> clazz)
          Get the HTML file corresponding to the Java.
static File getOutput(Class<?> clazz, File input)
          Get the output file.
static String getOutputName(String name)
          Get the output name adjusted.
static IScenarioListener[] getScenarioListener(Class<?> type)
          Given a class return instances for scenario listeners.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PATH

public static final String PATH
Output path.

Method Detail

getFile

public static File getFile(Class<?> clazz)
Get the HTML file corresponding to the Java.

Parameters:
clazz - The test class.
Returns:
The input HTML file.

getOutput

public static File getOutput(Class<?> clazz,
                             File input)
Get the output file.

Parameters:
clazz - The test class.
input - The input file.
Returns:
The output file.

getOutputName

public static String getOutputName(String name)
Get the output name adjusted.

Parameters:
name - The original name.
Returns:
The adjusted name. ie. Excel (.xls,.xlsx) test files are transformed to HTML (.html).

getScenarioListener

public static IScenarioListener[] getScenarioListener(Class<?> type)
Given a class return instances for scenario listeners.

Parameters:
type - The base object type.
Returns:
An array of listener instances.


Copyright © 2014. All rights reserved.