org.eclipse.xtext.junit4.parameterized
Class ParameterizedXtextRunner

java.lang.Object
  extended by org.junit.runner.Runner
      extended by org.junit.runners.ParentRunner<ParameterizedXtextRunner.ResourceRunner>
          extended by org.eclipse.xtext.junit4.parameterized.ParameterizedXtextRunner
All Implemented Interfaces:
org.junit.runner.Describable, org.junit.runner.manipulation.Filterable, org.junit.runner.manipulation.Sortable

public class ParameterizedXtextRunner
extends org.junit.runners.ParentRunner<ParameterizedXtextRunner.ResourceRunner>

Author:
Moritz Eysholdt - Initial contribution and API

Nested Class Summary
protected static class ParameterizedXtextRunner.MethodWithExpectation
           
protected static class ParameterizedXtextRunner.ParameterSetRunner
           
protected static class ParameterizedXtextRunner.ResourceRunner
           
 
Field Summary
protected  java.util.List<ParameterizedXtextRunner.ResourceRunner> children
           
protected  org.junit.runner.manipulation.Filter filter
           
protected  java.util.Map<java.lang.String,ParameterizedXtextRunner.MethodWithExpectation> methods
           
 
Constructor Summary
ParameterizedXtextRunner(java.lang.Class<?> testClass)
           
 
Method Summary
protected  IInjectorProvider createInjectorProvider()
           
protected  org.junit.runner.Description describeChild(ParameterizedXtextRunner.ResourceRunner child)
           
 void filter(org.junit.runner.manipulation.Filter filter)
           
protected  ParameterizedXtextRunner.MethodWithExpectation findTestMethod(java.lang.String name)
           
protected  java.util.List<ParameterizedXtextRunner.ResourceRunner> getChildren()
           
protected  IInjectorProvider getInjectorProvider()
           
protected  IInjectorProvider getOrCreateInjectorProvider()
           
protected  java.util.List<org.eclipse.emf.common.util.URI> getURIs()
           
protected  java.util.List<org.eclipse.emf.common.util.URI> getURIs(org.junit.runners.model.FrameworkMethod method)
           
protected  java.util.List<org.eclipse.emf.common.util.URI> getURIs(ResourceURIs uris)
           
protected  void injectParameters(java.lang.Object test, com.google.common.collect.Multimap<java.lang.String,java.lang.Object> params)
           
protected  java.lang.Object newTestInstance()
           
protected  void runChild(ParameterizedXtextRunner.ParameterSetRunner ps)
           
protected  void runChild(ParameterizedXtextRunner.ResourceRunner arg0, org.junit.runner.notification.RunNotifier notifier)
           
 
Methods inherited from class org.junit.runners.ParentRunner
childrenInvoker, classBlock, collectInitializationErrors, getDescription, getName, getTestClass, run, sort, validatePublicVoidNoArgMethods, withAfterClasses, withBeforeClasses
 
Methods inherited from class org.junit.runner.Runner
testCount
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

children

protected java.util.List<ParameterizedXtextRunner.ResourceRunner> children

filter

protected org.junit.runner.manipulation.Filter filter

methods

protected java.util.Map<java.lang.String,ParameterizedXtextRunner.MethodWithExpectation> methods
Constructor Detail

ParameterizedXtextRunner

public ParameterizedXtextRunner(java.lang.Class<?> testClass)
                         throws org.junit.runners.model.InitializationError
Throws:
org.junit.runners.model.InitializationError
Method Detail

createInjectorProvider

protected IInjectorProvider createInjectorProvider()

describeChild

protected org.junit.runner.Description describeChild(ParameterizedXtextRunner.ResourceRunner child)
Specified by:
describeChild in class org.junit.runners.ParentRunner<ParameterizedXtextRunner.ResourceRunner>

filter

public void filter(org.junit.runner.manipulation.Filter filter)
            throws org.junit.runner.manipulation.NoTestsRemainException
Specified by:
filter in interface org.junit.runner.manipulation.Filterable
Overrides:
filter in class org.junit.runners.ParentRunner<ParameterizedXtextRunner.ResourceRunner>
Throws:
org.junit.runner.manipulation.NoTestsRemainException

findTestMethod

protected ParameterizedXtextRunner.MethodWithExpectation findTestMethod(java.lang.String name)
                                                                 throws java.lang.Throwable
Throws:
java.lang.Throwable

getChildren

protected java.util.List<ParameterizedXtextRunner.ResourceRunner> getChildren()
Specified by:
getChildren in class org.junit.runners.ParentRunner<ParameterizedXtextRunner.ResourceRunner>

getInjectorProvider

protected IInjectorProvider getInjectorProvider()

getOrCreateInjectorProvider

protected IInjectorProvider getOrCreateInjectorProvider()

getURIs

protected java.util.List<org.eclipse.emf.common.util.URI> getURIs()

getURIs

protected java.util.List<org.eclipse.emf.common.util.URI> getURIs(org.junit.runners.model.FrameworkMethod method)

getURIs

protected java.util.List<org.eclipse.emf.common.util.URI> getURIs(ResourceURIs uris)

newTestInstance

protected java.lang.Object newTestInstance()
                                    throws java.lang.SecurityException,
                                           java.lang.NoSuchMethodException,
                                           java.lang.IllegalArgumentException,
                                           java.lang.InstantiationException,
                                           java.lang.IllegalAccessException,
                                           java.lang.reflect.InvocationTargetException
Throws:
java.lang.SecurityException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

injectParameters

protected void injectParameters(java.lang.Object test,
                                com.google.common.collect.Multimap<java.lang.String,java.lang.Object> params)

runChild

protected void runChild(ParameterizedXtextRunner.ParameterSetRunner ps)
                 throws java.lang.Throwable
Throws:
java.lang.Throwable

runChild

protected void runChild(ParameterizedXtextRunner.ResourceRunner arg0,
                        org.junit.runner.notification.RunNotifier notifier)
Specified by:
runChild in class org.junit.runners.ParentRunner<ParameterizedXtextRunner.ResourceRunner>