ShutdownHookEmailModuleUnitTest¶
-
public class
ShutdownHookEmailModuleUnitTest
extends ModuleTest<ShutdownHookEmailModule>¶ The
ShutdownHookEmailModuleUnitTest
is unit test ofShutdownHookEmailModule
.Author: Twinsen Tsang
Constructors¶
Methods¶
getModuleDescriptionSet¶
-
public static Collection
getModuleDescriptionSet
()¶
testCreateShutdownHookWorker¶
-
public void
testCreateShutdownHookWorker
()¶ Test whether the
ShutdownHookEmailModule.createShutdownHookWorker()
able to wire up all properties from the module descriptor and it is an instance of ShutdownHookEmailThread. Note that the assertion actually take place in a helper class called CreateShudownHookWorkerAssertionThread. It is essential because the ShutdownHook worker thread is loaded through a clone of current class loader and therefore the class only appear in that domain.
testGetThread¶
-
public void
testGetThread
()¶ Test whether
ShutdownHookEmailModule.getThread()
always return non null value.
testOnCreateMailNotificationBody¶
-
public void
testOnCreateMailNotificationBody
()¶ This test has not implemented yet because the mail subject is subject to change.
testOnCreateMailNotificationSubject¶
-
public void
testOnCreateMailNotificationSubject
()¶ This test has not implemented yet because the mail subject is subject to change.
testShutdownHookRegisteredToRuntime¶
-
public void
testShutdownHookRegisteredToRuntime
()¶ Test whether the thread from
ShutdownHookEmailModule.getThread()
is registered inside the runtime shutdown hook.