public class ConfigurationTest
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ConfigurationTest.Component
A component interface and basic implementation.
|
static class |
ConfigurationTest.FileComponent
A component reading a file directly.
|
static class |
ConfigurationTest.URLComponent
A component reading a file from an URL.
|
| Modifier and Type | Field and Description |
|---|---|
private static ConfigurationTest.Component |
comp
Stores the currently active component.
|
private static java.io.File |
FILE
Stores the file to be created and read.
|
| Modifier | Constructor and Description |
|---|---|
private |
ConfigurationTest()
Prevents this class from being initialized from outside.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
asserts()
The automated tests using assert statements.
|
static void |
configHandler(boolean file)
Handles a component configuration change.
|
private static java.lang.String |
configToId(boolean file)
Returns the recording identifier.
|
static void |
main(java.lang.String[] args)
Starts the test.
|
private static void |
testComponent(java.lang.String recId,
long expectedRead)
Tests all recordings of a component.
|
private static void |
testConfiguration(java.lang.String recId,
long expectedRead)
Tests all configurations which contain
recId. |
private static final java.io.File FILE
private static ConfigurationTest.Component comp
private ConfigurationTest()
private static java.lang.String configToId(boolean file)
file - use file or URLpublic static void configHandler(boolean file)
file - use file or URLpublic static void main(java.lang.String[] args)
args - ignoredpublic static void asserts()
EndSystem
annotation.private static void testConfiguration(java.lang.String recId,
long expectedRead)
recId.recId - the recording identifier to search forexpectedRead - the expected number of read bytesprivate static void testComponent(java.lang.String recId,
long expectedRead)
recId - the recording id of the componentexpectedRead - the expected number of bytes read