|
Evaluating Software Design Patterns — the "Gang of Four" patterns implemented in Java 6 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object dk.rode.thesis.abstractfactory.Main
@Participant(value="Client") public class Main
Abstract Factory tests.
Constructor Summary | |
---|---|
Main()
No-arg constructor. |
Method Summary | ||
---|---|---|
static void |
main(String[] args)
Executes the Abstract Factory tests. |
|
boolean |
test(Log out,
Arguments arguments)
Performs the specific tests and report the outcome to the log supplied as log . |
|
private static
|
testAbstractionFactory(Log out,
String index,
AbstractionFactory<E> factory)
Test abstraction factories. |
|
private static
|
testGeneratorFactory(Log out,
String index,
GeneratorFactory<E,P> factory,
P argument)
Test generator factories. |
|
private static
|
testSequenceFactory(Log out,
String index,
SequenceFactory<E,P> factory,
P argument)
Test sequence factories. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Main()
Method Detail |
---|
public static void main(String[] args)
args
- The arguments to supply to test(Log, Arguments)
,
if any; can be null.public boolean test(Log out, Arguments arguments)
Testable
log
supplied as log
. Arguments to control log-level:
-log
: a boolean value (as a string) indicating if
class logging is enabled for relevant classes.
-log.verbose
: a boolean value (as a string) indicating
if class logging is enabled for relevant classes that generates
verbose output.
test
in interface Testable
out
- The log to report the test outcome to; cannot be null.arguments
- Additional arguments, if any.
private static final <E> void testAbstractionFactory(Log out, String index, AbstractionFactory<E> factory)
E
- The type of values generated by the created abstraction.out
- Log to use; never null.index
- The number of the test; never null.factory
- The factory to test; never null.private static final <E,P> void testGeneratorFactory(Log out, String index, GeneratorFactory<E,P> factory, P argument)
E
- The type of values generated by the created generator.P
- The type of argument to use in the creation process.out
- Log to use; never null.index
- The number of the test; never null.factory
- The factory to test; never null.argument
- Argument used in the creation process, if any; can be null.private static final <E,P> Sequence<E> testSequenceFactory(Log out, String index, SequenceFactory<E,P> factory, P argument)
E
- The type of values generated by the created sequence.P
- The type of argument to use in the creation process.out
- Log to use; never null.index
- The number of the test; never null.factory
- The factory to test; never null.argument
- Argument used in the creation process, if any; can be null.
|
Gunni Rode / rode.dk | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |