org.hibernate.testing.junit4
Class Helper

java.lang.Object
  extended by org.hibernate.testing.junit4.Helper

public class Helper
extends Object

Centralized utility functionality


Field Summary
static String VALIDATE_FAILURE_EXPECTED
           
 
Constructor Summary
Helper()
           
 
Method Summary
static String extractIgnoreMessage(FailureExpected failureExpected, org.junit.runners.model.FrameworkMethod frameworkMethod)
           
static String extractMessage(FailureExpected failureExpected)
           
static String extractMethodName(Method method)
          Extract a nice method name representation for display
static String extractTestName(org.junit.runners.model.FrameworkMethod frameworkMethod)
          Extract a nice test name representation for display
static boolean isNotEmpty(String string)
          Standard string content checking.
static
<T extends Annotation>
T
locateAnnotation(Class<T> annotationClass, org.junit.runners.model.FrameworkMethod frameworkMethod, org.junit.runners.model.TestClass testClass)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALIDATE_FAILURE_EXPECTED

public static final String VALIDATE_FAILURE_EXPECTED
See Also:
Constant Field Values
Constructor Detail

Helper

public Helper()
Method Detail

isNotEmpty

public static boolean isNotEmpty(String string)
Standard string content checking.

Parameters:
string - The string to check
Returns:
Are its content empty or the reference null?

extractTestName

public static String extractTestName(org.junit.runners.model.FrameworkMethod frameworkMethod)
Extract a nice test name representation for display

Parameters:
frameworkMethod - The test method.
Returns:
The display representation

extractMethodName

public static String extractMethodName(Method method)
Extract a nice method name representation for display

Parameters:
method - The method.
Returns:
The display representation

locateAnnotation

public static <T extends Annotation> T locateAnnotation(Class<T> annotationClass,
                                                        org.junit.runners.model.FrameworkMethod frameworkMethod,
                                                        org.junit.runners.model.TestClass testClass)

extractMessage

public static String extractMessage(FailureExpected failureExpected)

extractIgnoreMessage

public static String extractIgnoreMessage(FailureExpected failureExpected,
                                          org.junit.runners.model.FrameworkMethod frameworkMethod)


Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.