Package org.jboss.byteman.contrib.bmunit
Class BMRunnerUtil
- java.lang.Object
-
- org.jboss.byteman.contrib.bmunit.BMRunnerUtil
-
public class BMRunnerUtil extends Object
Class bundling sone utility ethods used by both JUnit and TestNG runner classes
-
-
Constructor Summary
Constructors Constructor Description BMRunnerUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
computeBMScriptName(String name)
method which computes the name of the BMRules file for a test class if it is not supplied in the class annotationstatic String
computeBMScriptName(String name, Method method)
method which computes the name of the BMRules file for a method test if it is not supplied in the method annotationstatic String
constructScriptText(BMRule[] bmRules)
construct the text of a rule script from a set of BMRule annotationsstatic String
normaliseLoadDirectory(BMScript annotation)
-
-
-
Method Detail
-
constructScriptText
public static String constructScriptText(BMRule[] bmRules)
construct the text of a rule script from a set of BMRule annotations- Parameters:
bmRules
- annotations describing the rules to be installed- Returns:
- the equivalent rule text
-
computeBMScriptName
public static String computeBMScriptName(String name, Method method)
method which computes the name of the BMRules file for a method test if it is not supplied in the method annotation- Parameters:
name
- the value supplied in the annotation or "" if it has been defaultedmethod
- the Framework method annotated with an @BMRules annotation- Returns:
- by default this returns the annotation value or the the bare method name if the annotation value is null or empty
-
computeBMScriptName
public static String computeBMScriptName(String name)
method which computes the name of the BMRules file for a test class if it is not supplied in the class annotation- Parameters:
name
- the value supplied in the annotation or "" if it has been defaulted- Returns:
- by default this returns the annotation value or null if the annotation value is null or empty.
-
-