public class Util
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Util.NoPointsException
Thrown when no Points annotations are found on the stack.
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_TIMEOUT |
Modifier and Type | Method and Description |
---|---|
static java.lang.Class<?>[] |
getClassList(java.lang.Object[] args)
Uses Java Reflection to ascertain the classes of each of the elements
of args.
|
static double |
getPointsFromAnnotation()
Gets the number of points allocated to the currently executing test
method.
|
static double |
getPointsFromAnnotation(java.lang.StackTraceElement[] stack)
Gets the number of points allocated to a test method, based on a stack
trace from within the call to that method.
|
static java.math.BigDecimal |
roundPoints(double points)
Rounds a double point value to a BigDecimal suitable for printing.
|
static void |
warn(java.lang.String message)
Prints a warning message.
|
public static final int DEFAULT_TIMEOUT
public static double getPointsFromAnnotation(java.lang.StackTraceElement[] stack)
Util.NoPointsException
- if the stack trace is ambiguous.java.lang.IllegalArgumentException
- if there is no currently executing
test method.public static double getPointsFromAnnotation()
java.lang.IllegalArgumentException
- if there is no currently executing test
method, or if the stack trace is ambiguous.public static java.math.BigDecimal roundPoints(double points)
public static void warn(java.lang.String message)
public static java.lang.Class<?>[] getClassList(java.lang.Object[] args)