Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Worked on the Javadoc documentation.
  • Loading branch information
bvenners committed Jun 26, 2013
1 parent 4042b42 commit 54612e2
Show file tree
Hide file tree
Showing 8 changed files with 34 additions and 22 deletions.
1 change: 0 additions & 1 deletion src/main/java/sbt/testing/AnnotatedFingerprint.java
Expand Up @@ -3,7 +3,6 @@
/**
* Indicates that classes or modules with a specific annotation, either on at least one top level
* method or on the class or module itself, should be discovered as test classes.
*
*/
public interface AnnotatedFingerprint extends Fingerprint {

Expand Down
16 changes: 7 additions & 9 deletions src/main/java/sbt/testing/Event.java
Expand Up @@ -7,32 +7,30 @@ public interface Event {

/**
* The fully qualified name of a class that can rerun the suite or test
* about which an event was fired. This method should never return <code>null</code>.
* about which an event was fired.
*/
String fullyQualifiedName();

/**
* The fingerprint of the test class whose fully qualifed name is returned by the <code>fullyQualifiedName</code>
* method on this <code>Event</code>. If the <code>isModule</code> method of the fingerprint indicates that the
* <code>fullyQualifiedName</code> refers to a module (singleton object), the
* <code>fullyQualifiedName</code> string does not include the trailing dollar sign.
* method on this <code>Event</code>. If the <code>isModule</code> method of the fingerprint indicates that the
* <code>fullyQualifiedName</code> refers to a module (singleton object), the
* <code>fullyQualifiedName</code> string does not include the trailing dollar sign.
*/
Fingerprint fingerprint();

/**
* Additional information identifying the suite or test about which an event was fired. This
* method should never return <code>null</code>.
* Additional information identifying the suite or test about which an event was fired.
*/
Selector selector();

/**
* Indicates whether the event represents a test failure, error, success, or skip. This method should
* never return <code>null</code>.
* Indicates whether the event represents a test success, failure, error, skipped, ignored, canceled, pending.
*/
Status status();

/**
* An <code>OptionalThrowable</code> associated with this <code>Event</code>.
* An <a href="OptionalThrowable.html"><code>OptionalThrowable</code></a> associated with this <code>Event</code>.
*/
OptionalThrowable throwable();

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/sbt/testing/EventHandler.java
Expand Up @@ -5,8 +5,8 @@
* during a run.
*
* <p>
* An event handler is passed to the test framework via the <code>runner</code> method
* in <code>Framework</code>.
* An event handler is passed to the test framework via the <code>execute</code> method
* of <a href="Task.html"><code>Task</code></a>s.
* </p>
*/
public interface EventHandler {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/sbt/testing/Fingerprint.java
Expand Up @@ -2,6 +2,6 @@

/**
* A way to identify test classes and/or modules that should
* be discovered when the the client performs discovery.
* be discovered when the client performs discovery.
*/
public interface Fingerprint {}
8 changes: 4 additions & 4 deletions src/main/java/sbt/testing/Framework.java
Expand Up @@ -6,13 +6,12 @@
public interface Framework {

/**
* The name of the test framework that this object represents.
* It is intended to be a human readable label.
* A human-friendly name of the test framework that this object represents.
*/
public String name();

/**
* An array of <code>Fingerprint</code> that specify how to identify test classes during
* An array of <a href="Fingerprint.html"><code>Fingerprint</code></a>s that specify how to identify test classes during
* discovery.
*/
public Fingerprint[] fingerprints();
Expand All @@ -25,8 +24,9 @@ public interface Framework {
* the test framework may throw <code>IllegalStateException</code>to indicate it
* cannot perform the two runs concurrently.
* </p>
*
* @param args the test-framework-specific arguments for the new run
* @param remoteArgs the test-framework-specific remote arguments for the run in forked jvm
* @param remoteArgs the test-framework-specific remote arguments for the run in a forked JVM
* @param testClassLoader a class loader to use when loading test classes during the run
*
* @return a <code>Runner</code> representing the newly started run.
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/sbt/testing/Logger.java
Expand Up @@ -6,7 +6,7 @@
* <p>
* The difference between the event handler and the logger is that the event handler is
* for events intended to be consumed by the client software whereas the logger is
* for messages intended to be consumed by the client *user* (i.e., a human).
* for messages intended to be consumed by the client *user* (<em>i.e.</em>, a human).
* </p>
*
* <p>
Expand Down Expand Up @@ -42,7 +42,7 @@ public interface Logger {
public void info(String msg);

/**
* Provide an debug message.
* Provide a debug message.
*
* @param msg the debug message
*/
Expand Down
20 changes: 17 additions & 3 deletions src/main/java/sbt/testing/OptionalThrowable.java
Expand Up @@ -3,28 +3,42 @@
import java.io.Serializable;

/**
* Indicates an event was about the entire suite whose class had the fully qualified name specified as
* the <code>fullyQualifiedName</code> attribute the event.
* An optional <code>Throwable</code>.
*/
public final class OptionalThrowable implements Serializable {

private Throwable exception;

// TODO: NPE
/**
* Constructs an <code>OptionalThrowable</code> containing a <code>Throwable</code>.
*/
public OptionalThrowable(Throwable exception) {
if (exception == null) {
throw new NullPointerException("Cannot pass a null exception to OptionalThrowable's constructor.");
}
this.exception = exception;
}

/**
* Constructs an <code>OptionalThrowable</code> containing no <code>Throwable</code>.
*/
public OptionalThrowable() {
}

/**
* Indicates whether this <code>OptionalThrowable</code> is "defined," <em>i.e.</em>, contains a <code>Throwable</code>.
*
* @return true if this <code>OptionalThrowable</code> contains a <code>Throwable</code>
*/
public boolean isDefined() {
return exception != null;
}

/**
* Indicates whether this <code>OptionalThrowable</code> is "empty," <em>i.e.</em>, contains no <code>Throwable</code>.
*
* @return true if this <code>OptionalThrowable</code> contains no <code>Throwable</code>
*/
public boolean isEmpty() {
return exception == null;
}
Expand Down
1 change: 1 addition & 0 deletions src/main/java/sbt/testing/Task.java
Expand Up @@ -28,6 +28,7 @@ public interface Task {

/**
* Execute a task, possibly returning to the client new tasks to execute.
*
* @param eventHandler an event handler to which to fire events during the run
* @param loggers an array of loggers to which to emit log messages during the run
* @return a possibly empty array of new tasks for the client to execute
Expand Down

0 comments on commit 54612e2

Please sign in to comment.