public abstract class Reporter extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Reporter.Message
A container of message information to be processed by
Reporter. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ERROR
the level at which error messages are generated
|
static int |
INFO
the level at which information messages are generated
|
static int |
WARNING
the level at which warning messages are generated
|
| Modifier and Type | Method and Description |
|---|---|
static int |
getErrorCount()
Get the total number of error records that were generated.
|
static int |
getWarningCount()
Get the total number of warning records that were generated.
|
static void |
print(Reporter.Message message)
Generate the output for
message . |
static void |
print(Reporter.Message message,
String source)
Generate the output for
message. |
static void |
setExplanation(boolean explain)
Set the explanation generation flag;
|
static void |
setLevel(int level)
Set the reporting level.
|
static void |
setPrintTraces(boolean traces)
Set the flag controlling printing of stack traces.
|
public static final int INFO
public static final int WARNING
public static final int ERROR
public static void setLevel(int level)
level - the max level to generate outputpublic static void setExplanation(boolean explain)
explain - the value to set the flag topublic static void setPrintTraces(boolean traces)
traces - if true, print stack tracespublic static void print(Reporter.Message message)
message . This method is silent
if the message level is less than reportLevel.
If explain is true, the explanation text
will be output only the first time it is encountered.message - the Message to printpublic static void print(Reporter.Message message, String source)
message. This method is silent if
the message level is less than Reporter.level. If
Reporter.explain is true, the explanation text
will be output only the first time it is encountered. If
source is null, the source record is not
output. If the message level is error or warning, the appropriate counter
is updated.message - the Message to printsource - additional information identifying the component under testpublic static int getWarningCount()
public static int getErrorCount()
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.