de.bechte.junit.runners.context.processing
Class ContextResolver

java.lang.Object
  extended by de.bechte.junit.runners.context.processing.ContextResolver
All Implemented Interfaces:
ChildResolver<Class<?>>

public class ContextResolver
extends Object
implements ChildResolver<Class<?>>

A ContextResolver is responsible for resolving all sub-contexts for the given TestClass. A sub-context of a class A can be defined by declaring a public inner class B of A. Example: public class A {


Constructor Summary
ContextResolver()
           
 
Method Summary
 List<Class<?>> getChildren(org.junit.runners.model.TestClass testClass)
          Resolved the children of type T for the given TestClass.
protected  boolean isAllowed(Class<?> candidate)
          Verifies, if the given candidate is allowed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContextResolver

public ContextResolver()
Method Detail

getChildren

public List<Class<?>> getChildren(org.junit.runners.model.TestClass testClass)
Description copied from interface: ChildResolver
Resolved the children of type T for the given TestClass.

Specified by:
getChildren in interface ChildResolver<Class<?>>
Parameters:
testClass - the TestClass to resolve the children for
Returns:
a List of children of type T

isAllowed

protected boolean isAllowed(Class<?> candidate)
Verifies, if the given candidate is allowed. If this method return false the candidate will be removed from the list of children returned by getChildren(org.junit.runners.model.TestClass). Note: Clients may override this method to provide custom filtering.

Parameters:
candidate - the candidate to verify
Returns:
a boolean value


Copyright © 2015. All rights reserved.