public interface DriverInterface
Modifier and Type | Interface and Description |
---|---|
static class |
DriverInterface.ListType
This
enum is used to specify which list implementation to use. |
static class |
DriverInterface.TestType
This
enum is used to specify which test scenario will be executed. |
Modifier and Type | Method and Description |
---|---|
ListInterface<java.lang.Integer> |
createList(DriverInterface.ListType listType,
DriverInterface.TestType forTestType)
This method is used to create a new list of the specified listType.
|
ListInterface<java.lang.Integer> |
initializeList(ListInterface<java.lang.Integer> list,
int firstNumber,
int lastNumber,
int increment)
This method is called by the createList() method to initialize the test list.
|
double |
memoryUsage()
This method is used to calculate the amount of memory being used in the JVM currently.
|
RunTime |
runTestCase(DriverInterface.ListType listType,
DriverInterface.TestType testType,
int numberOfTimes)
This method is called to run a particular test case on a list type a total of ten times.
|
ListInterface<java.lang.Integer> createList(DriverInterface.ListType listType, DriverInterface.TestType forTestType)
listType
- This parameter specifies the type of list to create. See the enum DriverInterface.ListType
.forTestType
- This parameter specifies the type of test that the list is being created for. See the enum
DriverInterface.TestType
.ListInterface<java.lang.Integer> initializeList(ListInterface<java.lang.Integer> list, int firstNumber, int lastNumber, int increment)
list
- The list to be initialized.firstNumber
- The first number to be added to the list.lastNumber
- The last number to be added to the listincrement
- The increment to be used by the for loop for each iteration. If the increment is zero, the
test list is left empty.double memoryUsage()
double
representing the amount of memory in megabytes currently allocated in
the JVM. Please note that you must convert from kilobytes to megabytes.RunTime runTestCase(DriverInterface.ListType listType, DriverInterface.TestType testType, int numberOfTimes)
listType
- The type of list needed. See the enum DriverInterface.ListType
.testType
- The type of test case being run. See the enum DriverInterface.TestType
.numberOfTimes
- This parameter specifies the number of times to run the specified test.