net.sf.gridarta.model.errorview
public class TestErrorView extends Object implements ErrorView
ErrorView
suitable for unit tests.Modifier and Type | Field and Description |
---|---|
private boolean |
hasErrors
Whether errors have been collected.
|
private boolean |
hasWarnings
Whether warnings have been collected.
|
private static org.apache.log4j.Category |
log
The
Logger for printing log messages. |
Constructor and Description |
---|
TestErrorView() |
Modifier and Type | Method and Description |
---|---|
void |
addError(ErrorViewCategory categoryName,
int lineNo,
String message)
Adds an error message.
|
void |
addError(ErrorViewCategory categoryName,
String message)
Adds an error message.
|
void |
addWarning(ErrorViewCategory categoryName,
int lineNo,
String message)
Adds a warning message.
|
void |
addWarning(ErrorViewCategory categoryName,
String message)
Adds a warning message.
|
boolean |
hasErrors()
Whether at least one error message has been added.
|
boolean |
hasWarnings()
Returns whether at least one warning message has been added.
|
void |
waitDialog()
Waits until the dialog has been dismissed.
|
@NotNull private static final org.apache.log4j.Category log
Logger
for printing log messages.private boolean hasErrors
private boolean hasWarnings
public TestErrorView()
public void addError(@NotNull ErrorViewCategory categoryName, @NotNull String message)
public void addError(@NotNull ErrorViewCategory categoryName, int lineNo, @NotNull String message)
public void addWarning(@NotNull ErrorViewCategory categoryName, @NotNull String message)
addWarning
in interface ErrorView
categoryName
- the warning categorymessage
- the warning messagepublic void addWarning(@NotNull ErrorViewCategory categoryName, int lineNo, @NotNull String message)
addWarning
in interface ErrorView
categoryName
- the warning categorylineNo
- the line number of the error messagemessage
- the warning messagepublic boolean hasErrors()
public boolean hasWarnings()
public void waitDialog() throws InterruptedException
waitDialog
in interface ErrorView
InterruptedException
- if the current thread has been interrupted
while waiting for the dialog to closeFeedback: webmaster
© 2003-2010 The Gridarta Developers. All rights reserved.