|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jdiagnose.DiagnosticUnit
A Diagnostic Unit. This behaves in a similar way to JUnit *Test classes.
Subclass this method and when this diagnostic is run, any void methods that
start with "diagnose" will be run. e.g.
public class FailingDiagnostic extends DiagnosticUnit {
public void diagnoseFailure() {
assertTrue("False isn't True!", false);
}
}
User: jamie Date: May 29, 2004 Time: 11:10:21 PM
Constructor Summary | |
DiagnosticUnit()
Creates a new DiagnosticUnit. |
|
DiagnosticUnit(java.lang.String name)
Create a new DiagnosticUnit with a Fully Qualified Name |
Method Summary | |
void |
assertEquals(java.lang.Object toTestAgainst,
java.lang.Object test)
Assert that two objects are equal |
void |
assertEquals(java.lang.String msg,
java.lang.Object toTestAgainst,
java.lang.Object test)
Assert that two objects are equal |
void |
assertNotNull(java.lang.Object test)
Assert that an object is not null |
void |
assertNotNull(java.lang.String msg,
java.lang.Object test)
Assert that an object is not null |
void |
assertNull(java.lang.Object test)
Assert that an object is null |
void |
assertNull(java.lang.String msg,
java.lang.Object test)
Assert that an object is null |
void |
assertTrue(boolean test)
Assert that a test is true |
void |
assertTrue(java.lang.String msg,
boolean test)
Assert that a test is true |
void |
diagnose()
Run this diagnostic. |
java.util.List |
getDiagnosticContainers()
|
java.util.List |
getDiagnostics()
Get the children Diagnostics of this diagnostic. |
java.lang.String |
getName()
Returns the name of this diagnostic. |
void |
setUp()
Set Up method. |
void |
tearDown()
Tear Down method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DiagnosticUnit(java.lang.String name)
name
- the name of this diagnostic.public DiagnosticUnit()
Method Detail |
public void setUp() throws java.lang.Exception
setUp
in interface DiagnosticUnitLifeCycle
java.lang.Exception
public void tearDown() throws java.lang.Exception
tearDown
in interface DiagnosticUnitLifeCycle
java.lang.Exception
public java.lang.String getName()
getName
in interface Diagnostic
public java.util.List getDiagnostics()
getDiagnostics
in interface DiagnosticContainer
public void assertTrue(java.lang.String msg, boolean test)
msg
- a message if the assertion if falsetest
- the test to testpublic void assertTrue(boolean test)
test
- the test to testpublic void assertEquals(java.lang.String msg, java.lang.Object toTestAgainst, java.lang.Object test)
msg
- a message if the assertion if falsetoTestAgainst
- the object to test againsttest
- the test objectpublic void assertEquals(java.lang.Object toTestAgainst, java.lang.Object test)
toTestAgainst
- the object to test againsttest
- the test objectpublic void assertNull(java.lang.String msg, java.lang.Object test)
msg
- a message if the assertion if falsetest
- the test objectpublic void assertNull(java.lang.Object test)
test
- the test objectpublic void assertNotNull(java.lang.String msg, java.lang.Object test)
msg
- a message if the assertion if falsetest
- the test objectpublic void assertNotNull(java.lang.Object test)
test
- the test objectpublic java.util.List getDiagnosticContainers()
getDiagnosticContainers
in interface DiagnosticContainer
DiagnosticContainer.getDiagnosticContainers()
public void diagnose() throws DiagnosticException
Diagnostic
diagnose
in interface Diagnostic
DiagnosticException
- if the diagnostic failedDiagnostic.diagnose()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |