|
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.Objectdk.rode.thesis.command.Main
@Participant(value="Client") public class Main
Command tests.
| Constructor Summary | |
|---|---|
Main()
No-arg constructor. |
|
| Method Summary | ||
|---|---|---|
private static
|
doTest(Log out,
int index,
Sequence<E> s,
Creator creator,
Boolean fail,
boolean copy)
Executes a given command test for a given sequence. |
|
static void |
main(String[] args)
Executes the Command tests. |
|
boolean |
test(Log out,
Arguments arguments)
Performs the specific tests and report the outcome to the log supplied as log. |
|
private static boolean |
test(Log out,
String heading,
Sequence<?>[] sequences,
Creator creator,
Boolean fail,
boolean copy)
Executes a given command test for all sequences. |
|
private static
|
test1(Log out,
Sequence<E> sequence,
Boolean fail)
Creates command for the first composite test. |
|
private static
|
test2(Log out,
Sequence<E> sequence,
Boolean fail)
Creates command for the second composite test. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Main()
| Method Detail |
|---|
private static final <E> boolean doTest(Log out,
int index,
Sequence<E> s,
Creator creator,
Boolean fail,
boolean copy)
E - The type of values delivered by s.out - The log to use; never null.index - The index of sequence.s - The sequence to use; never null.creator - The creator used to create and supply the commands to
test; never null.fail - Flag to determine if the test is supposed to fail or not.copy - True if the sequences should be copied before use, false if not.
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)
Testablelog 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 Testableout - The log to report the test outcome to; cannot be null.arguments - Additional arguments, if any.
private static final boolean test(Log out,
String heading,
Sequence<?>[] sequences,
Creator creator,
Boolean fail,
boolean copy)
out - The log to use; never null.heading - Title of the test; never null.sequences - The sequences to use; never null.creator - The creator used to create and supply the commands to
test; never null.fail - Flag to determine if the test is supposed to fail or not.copy - True if the sequences should be copied before use, false if not.
private static final <E> List<Command<E>> test1(Log out,
Sequence<E> sequence,
Boolean fail)
E - The type of values delivered by sequence.out - The log to use; never null.sequence - The sequence to use; never null.fail - Flag to determine if the test is supposed to fail or not.
private static final <E> List<Command<E>> test2(Log out,
Sequence<E> sequence,
Boolean fail)
E - The type of values delivered by sequence.out - The log to use; never null.sequence - The sequence to use; never null.fail - Flag to determine if the test is supposed to fail or not.
|
Gunni Rode / rode.dk | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||