org.jdiagnose.library
Class TimeLimitDiagnostic
java.lang.Object
org.jdiagnose.DiagnosticUnit
org.jdiagnose.library.TimeLimitDiagnostic
- All Implemented Interfaces:
- Diagnostic, DiagnosticContainer, DiagnosticUnitLifeCycle
- public class TimeLimitDiagnostic
- extends DiagnosticUnit
Times a diagnostic and fails if the diagnostic took longer than maxTimeLimit
or shorter than minTimeLimit to finish.
- Author:
- jmccrindle
Methods inherited from class org.jdiagnose.DiagnosticUnit |
assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertTrue, assertTrue, diagnose, getDiagnosticContainers, getDiagnostics, getName, setUp, tearDown |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TimeLimitDiagnostic
public TimeLimitDiagnostic()
- Default Constructor
TimeLimitDiagnostic
public TimeLimitDiagnostic(java.lang.String name)
- Construct with a new fully qualified name
- Parameters:
name
- the fqn of this diagnostic
diagnoseTimeLimit
public void diagnoseTimeLimit()
throws DiagnosticException
- Check to see that the Java Version is 1.3 or higher
- Throws:
DiagnosticException
- if the Java Version isn't matched
setDiagnostic
public void setDiagnostic(Diagnostic diagnostic)
- Parameters:
diagnostic
- The diagnostic to set.
setMaxTimeMillis
public void setMaxTimeMillis(long maxTimeMillis)
- Parameters:
maxTimeMillis
- The maxTimeMillis to set.
setMinTimeMillis
public void setMinTimeMillis(long minTimeMillis)
- Parameters:
minTimeMillis
- The minTimeMillis to set.
setRethrowFailures
public void setRethrowFailures(boolean rethrowFailures)
- Parameters:
rethrowFailures
- The rethrowFailures to set.
Copyright © 2004-2005 Grape Design Limited. All Rights Reserved.