org.jboss.byteman.contrib.bmunit
Class BMRunnerUtil

java.lang.Object
  extended by org.jboss.byteman.contrib.bmunit.BMRunnerUtil

public class BMRunnerUtil
extends java.lang.Object

Class bundling sone utility ethods used by both JUnit and TestNG runner classes


Constructor Summary
BMRunnerUtil()
           
 
Method Summary
static java.lang.String computeBMScriptName(java.lang.String name)
          method which computes the name of the BMRules file for a test class if it is not supplied in the class annotation
static java.lang.String computeBMScriptName(java.lang.String name, java.lang.reflect.Method method)
          method which computes the name of the BMRules file for a method test if it is not supplied in the method annotation
static java.lang.String constructScriptText(BMRule[] bmRules)
          construct the text of a rule script from a set of BMRule annotations
static java.lang.String normaliseLoadDirectory(BMScript annotation)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BMRunnerUtil

public BMRunnerUtil()
Method Detail

normaliseLoadDirectory

public static java.lang.String normaliseLoadDirectory(BMScript annotation)

constructScriptText

public static java.lang.String constructScriptText(BMRule[] bmRules)
construct the text of a rule script from a set of BMRule annotations

Parameters:
bmRules -
Returns:

computeBMScriptName

public static java.lang.String computeBMScriptName(java.lang.String name,
                                                   java.lang.reflect.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 defaulted
method - 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 java.lang.String computeBMScriptName(java.lang.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
testClass - the test class annotated with an @BMRules annotation
Returns:
by default this returns the annotation value or null if the annotation value is null or empty.


Copyright © 2011. All Rights Reserved.