public abstract class TestClassTransformer<T,M> extends Object implements MockTransformer<T>
ConstructorsMockTransformer
)
- to avoid that multiple public test-class constructors cause
a delegate runner from JUnit (or 3rd party) to bail out with an
error message such as "Test class can only have one constructor".
4) Set test-class defer constructor (if exist) as protected instead of public.
Otherwise a delegate runner from JUnit (or 3rd party) might get confused by
the presence of more than one test-class constructor and bail out with an
error message such as "Test class can only have one constructor".
The #3 and #4 enhancements will also be enforced on the constructors of classes that are nested within the test-class.
Constructor and Description |
---|
TestClassTransformer(Class<?> testClass,
Class<? extends Annotation> testMethodAnnotationType,
MethodSignatureWriter<M> methodSignatureWriter) |
Modifier and Type | Method and Description |
---|---|
protected Class<?> |
getTestClass() |
protected Class<? extends Annotation> |
getTestMethodAnnotationType() |
protected String |
signatureOf(M method) |
protected String |
signatureOf(Method m) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
transform
public TestClassTransformer(Class<?> testClass, Class<? extends Annotation> testMethodAnnotationType, MethodSignatureWriter<M> methodSignatureWriter)
Copyright © 2019. All rights reserved.