public class ComponentLifecycleTest extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ComponentLifecycleTest.CloseableComponent
Component implementing AutoCloseable that should be closed.
|
static class |
ComponentLifecycleTest.Flag
Flag component for detecting closure.
|
static class |
ComponentLifecycleTest.LifecycleShutdownComponent
Component with PreDestroy method that must be called.
|
static class |
ComponentLifecycleTest.PostConstructComponent
component with post-construct methods
|
| Constructor and Description |
|---|
ComponentLifecycleTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
testCallsPostConstruct()
Test that the lifecycle management calls post-construct methods
|
void |
testCallsPreDestroy()
Test that the lifecycle management calls pre-destroy methods.
|
void |
testClosesAutoCloseable() |
void |
testDoesNotCallPreDestroyOnInstance()
Test that the lifecycle management does not call pre-destroy methods on an instance.
|
void |
testDoesNotCloseAutoCloseableInstance()
If we inject an instance of an AutoCloseable, it should not be closed.
|
public void testDoesNotCloseAutoCloseableInstance()
throws Exception
Exceptionpublic void testCallsPreDestroy()
throws Exception
Exceptionpublic void testDoesNotCallPreDestroyOnInstance()
throws Exception
ExceptionCopyright © 2016 GroupLens Research. All rights reserved.