Skip to content

Commit

Permalink
Tweak documentation. Add infinitest config.
Browse files Browse the repository at this point in the history
  • Loading branch information
hgcummings committed Jul 25, 2014
1 parent 2cfd6e0 commit 68f2adc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions infinitest.filters
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
io\.hgc\.jarspec\.examples\..*
io\.hgc\.jarspec\.fixtures\..*
14 changes: 7 additions & 7 deletions src/main/java/io/hgc/jarspec/SpecificationNode.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,37 +41,37 @@ boolean isSolo() {
}

/**
* Create a new internal node in the tree representing a specification.
* Factory method for internal nodes in the tree representing a specification.
* Consumers should generally use the default methods on {@link Specification}
* instead, unless creating their own behaviour mixin.
* @param description description for this node
* @param children list of child nodes
* @return the new node
* @return a newly-created node
*/
public static SpecificationNode internal(String description, List<SpecificationNode> children) {
return new Internal(description, immutableCopyOf(children), false);
}

/**
* Create a new leaf node in the tree representing a specification.
* Factory method for leaf nodes in the tree representing a specification.
* Consumers should generally use the default methods on {@link Specification}
* instead, unless creating their own behaviour mixin.
* @param description description for this node
* @param test optional automated test for this node
* @return the new node
* @return a newly-created node
*/
public static SpecificationNode leaf(String description, Optional<Test> test) {
return new Leaf(description, test, false);
}

/**
* Create a new error node in the tree representing a specification, indicating
* an exception thrown while building the specification tree itself.
* Factory method for error nodes in the tree representing a specification,
* indicating an exception thrown while building the specification tree itself.
* Consumers should generally use the default methods on {@link Specification}
* instead, unless creating their own behaviour mixin.
* @param description description for this node
* @param throwable the original error
* @return the new node
* @return a newly-created node
*/
public static SpecificationNode error(String description, Throwable throwable) {
return leaf(description, Optional.of(() -> {
Expand Down

0 comments on commit 68f2adc

Please sign in to comment.