Package org.opensaml.storage.testing

# Class StorageServiceTest

java.lang.Object
org.opensaml.storage.testing.StorageServiceTest

public abstract class StorageServiceTest extends Object
Test of `StorageService` implementations.

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`private class`
`StorageServiceTest.AnnotatedObject`
Annotated object class to test with.

## Field Summary

Fields
Modifier and Type
Field
Description
`protected SecureRandom`
`random`
Random source.
`protected EnumeratableStorageService`
`shared`
Service being tested.

## Constructor Summary

Constructors
Constructor
Description
`StorageServiceTest()`

## Method Summary

Modifier and Type
Method
Description
`void`
`enumerate()`
Test context enumeration.
`void`
`expiration()`
Test of expiration handling.
`protected abstract EnumeratableStorageService`
`getStorageService()`
Returns a fresh service instance to test.
`void`
`objects()`
Test object handling.
`protected void`
`setUp()`
`void`
`strings()`
Basic test of string records.
`protected void`
`tearDown()`
`protected void`
`threadInit()`
Called to init a thread in preparation to run a test.
`void`
`update()`
Test updates.
`void`
`versions()`
Test of versions > 127.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### random

protected SecureRandom random
Random source.

### shared

protected EnumeratableStorageService shared
Service being tested.

## Constructor Details

### StorageServiceTest

public StorageServiceTest()

## Method Details

### getStorageService

@Nonnull protected abstract EnumeratableStorageService getStorageService()
Returns a fresh service instance to test.

Returns:
  a new instance

### threadInit

protected void threadInit()
Called to init a thread in preparation to run a test.

### setUp

@BeforeClass protected void setUp() throws ComponentInitializationException

Throws:
  `ComponentInitializationException`

### tearDown

@AfterClass protected void tearDown()

### strings

public void strings() throws IOException
Basic test of string records.

Throws:
  `IOException` - on error

### expiration

public void expiration() throws IOException, InterruptedException
Test of expiration handling.

Throws:
  `IOException` - on error
  `InterruptedException` - on thread interruption

### versions

public void versions() throws IOException, VersionMismatchException
Test of versions > 127.

Throws:
  `IOException` - on error
  `VersionMismatchException` - on version mismatch

### update

public void update() throws IOException
Test updates.

Throws:
  `IOException` - on error

### objects

public void objects() throws IOException, InterruptedException
Test object handling.

Throws:
  `IOException` - on error
  `InterruptedException` - on thread interruption

### enumerate

public void enumerate() throws IOException
Test context enumeration.

Throws:
  `IOException` - on error