public abstract class AbstractConcurrentInitializerTest extends Object
An abstract base class for tests of concrete ConcurrentInitializer
implementations.
This class provides some basic tests for initializer implementations. Derived
class have to create a ConcurrentInitializer object on which the
tests are executed.
| Constructor and Description |
|---|
AbstractConcurrentInitializerTest() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract ConcurrentInitializer<Object> |
createInitializer()
Creates the
ConcurrentInitializer object to be tested. |
void |
testGet()
Tests a simple invocation of the get() method.
|
void |
testGetConcurrent()
Tests whether get() can be invoked from multiple threads concurrently.
|
void |
testGetMultipleTimes()
Tests whether sequential get() invocations always return the same
instance.
|
public AbstractConcurrentInitializerTest()
public void testGet() throws ConcurrentException
ConcurrentExceptionpublic void testGetMultipleTimes() throws ConcurrentException
ConcurrentExceptionpublic void testGetConcurrent() throws ConcurrentException, InterruptedException
protected abstract ConcurrentInitializer<Object> createInitializer()
ConcurrentInitializer object to be tested. This
method is called whenever the test fixture needs to be obtained.Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.