public abstract class AbstractDemoCase extends java.lang.Object implements IDemoCase, java.lang.Cloneable
| Constructor and Description |
|---|
AbstractDemoCase() |
AbstractDemoCase(java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(IDemoVisitor visitor) |
void |
after() |
protected static void |
assertNotNull(java.lang.String message,
java.lang.Object object) |
protected static void |
assertNull(java.lang.String message,
java.lang.Object object) |
protected static void |
assertTrue(java.lang.String message,
boolean condition) |
void |
before() |
void |
cancel()
Give this DemoCase the chance to exit.
|
protected java.lang.Object |
clone()
Returns a clone of this democase, that is a new instance being the same
demonstration case, but not having any listeners or other temporary
fields.
|
protected java.lang.ThreadGroup |
createThreadGroup() |
void |
executeSetUp()
Called by the DemoCaseRunner to invoke the setUp method.
|
void |
executeTearDown()
Called by the DemoCaseRunner to invoke the tearDown method.
|
protected void |
exit()
Can be called from within the demonstration code to indicate that this
demonstration has been finished.
|
protected static void |
fail(java.lang.String message) |
IDemoCase |
getClone() |
DemoIdentifier |
getIdentifier() |
java.lang.String |
getName()
Gets the demo method name of this DemoCase
|
protected IDemoCaseRunnable |
getRunnable() |
void |
runDemo()
Override to run the demo and assert its state.
|
void |
setName(java.lang.String demoMethodName)
Sets the name of this DemoCase
|
void |
setRunnable(IDemoCaseRunnable runnable) |
protected void |
setUp()
Sets up the fixture, for example, open a network connection.
|
protected void |
tearDown()
Tears down the fixture, for example, close a network connection.
|
java.lang.String |
toString()
Returns a string representation of the demo case id
|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateRunnablepublic AbstractDemoCase()
public AbstractDemoCase(java.lang.String name)
public void accept(IDemoVisitor visitor)
public final void setRunnable(IDemoCaseRunnable runnable)
protected final IDemoCaseRunnable getRunnable()
protected static void fail(java.lang.String message)
protected static void assertTrue(java.lang.String message,
boolean condition)
protected static void assertNotNull(java.lang.String message,
java.lang.Object object)
protected static void assertNull(java.lang.String message,
java.lang.Object object)
protected void setUp()
throws java.lang.Exception
java.lang.Exceptionprotected void tearDown()
throws java.lang.Exception
java.lang.Exceptionpublic final java.lang.String toString()
toString in class java.lang.Objectpublic final java.lang.String getName()
public final void setName(java.lang.String demoMethodName)
protected void exit()
cancel()protected java.lang.Object clone()
clone in class java.lang.Objectpublic IDemoCase getClone()
public final DemoIdentifier getIdentifier()
getIdentifier in interface IDemoCasepublic void cancel()
IDemoCaseRunnable when the user requests termination of the
Demo.
Should not be called from within a demo.public final void before()
throws java.lang.Exception
java.lang.Exceptionpublic final void after()
throws java.lang.Exception
java.lang.Exceptionpublic void executeSetUp()
throws java.lang.Exception
java.lang.Exceptionpublic void executeTearDown()
throws java.lang.Exception
java.lang.Exceptionprotected java.lang.ThreadGroup createThreadGroup()
public void runDemo()
throws java.lang.Throwable
java.lang.Throwable - if any exception is thrown
JDemo homepage: http://www.jdemo.de
Copyright © 2003-2012 Markus Gebhard. All Rights Reserved.