org.infinitest.toolkit.runners
Class EnclosedInners

java.lang.Object
  extended by org.junit.runner.Runner
      extended by org.junit.runners.ParentRunner<org.junit.runner.Runner>
          extended by org.infinitest.toolkit.runners.EnclosedInners
All Implemented Interfaces:
org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Sortable

public class EnclosedInners
extends org.junit.runners.ParentRunner<org.junit.runner.Runner>

Test classes run with this runner will have their inner test classes run as well, whether they be static or not. A non-static inner class will therefore have access to the fixtures of the enclosing class. Each non-static inner class test will get instantiated and attached to a new instance of the enclosing class. The Befores of the enclosing class will be run before those of the inner class. The Afters of the enclosing class will be run after those of the inner class.

Author:
Paul Holser

Constructor Summary
EnclosedInners(Class<?> enclosing)
          Called reflectively on the test class considered to be the "enclosing" class.
 
Method Summary
 
Methods inherited from class org.junit.runners.ParentRunner
filter, getDescription, run, sort
 
Methods inherited from class org.junit.runner.Runner
testCount
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnclosedInners

public EnclosedInners(Class<?> enclosing)
               throws org.junit.runners.model.InitializationError
Called reflectively on the test class considered to be the "enclosing" class. This should be a top-level Java class.

Parameters:
enclosing - enclosing test class
Throws:
org.junit.runners.model.InitializationError - if problems occur during runner creation


© Copyright 2009 Paul R. Holser, Jr. All rights reserved. pholser@alumni.rice.edu