public class J8TestClass extends TestClass
This is an extended test class model that, in addition, is able to discover any
@Test annotated default method of each (either directly or indirectly) implemented
interface. In result, all these @Test default methods will also be
executed – as long as there is no class specific implementation overriding the default
behaviour.
If you – as a progressive, excellent test-aware programmer– want to benefit from the improved test case composition, you should take a look at the J8Unit homepage to learn more about the J8Unit test style and about the J8Unit test repository.
| Constructor and Description |
|---|
J8TestClass(Class<?> clazz)
Creates a
J8TestClass based of the tests within the given Class. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
scanAnnotatedDefaultMethods(Map<Class<? extends Annotation>,List<FrameworkMethod>> methodsForAnnotations)
Scans for all
default methods and adds those into methodsForAnnotations if and only if there is
no specific class implementation. |
protected void |
scanAnnotatedMembers(Map<Class<? extends Annotation>,List<FrameworkMethod>> methodsForAnnotations,
Map<Class<? extends Annotation>,List<FrameworkField>> fieldsForAnnotations)
In addition to the
TestClass.scanAnnotatedMembers(Map, Map), this method also scans for @Test annotated default method of each (either directly or indirectly) implemented interface. |
addToAnnotationLists, equals, getAnnotatedFields, getAnnotatedFields, getAnnotatedFieldValues, getAnnotatedMethods, getAnnotatedMethods, getAnnotatedMethodValues, getAnnotation, getAnnotations, getJavaClass, getName, getOnlyConstructor, hashCode, isANonStaticInnerClass, isPublicpublic J8TestClass(Class<?> clazz)
Creates a J8TestClass based of the tests within the given Class. Each time this constructor
executes, the given Class is scanned for annotations –
including @Test annotated default method of each (either directly or indirectly)
implemented interface.
protected void scanAnnotatedMembers(Map<Class<? extends Annotation>,List<FrameworkMethod>> methodsForAnnotations, Map<Class<? extends Annotation>,List<FrameworkField>> fieldsForAnnotations)
In addition to the TestClass.scanAnnotatedMembers(Map, Map), this method also scans for @Test annotated default method of each (either directly or indirectly) implemented interface.
Each of these methods will be added into methodsForAnnotations if and only if there is no specific
class implementation.
scanAnnotatedMembers in class TestClassmethodsForAnnotations - the accumulator of all annotated MethodsfieldsForAnnotations - the accumulator of all annotated FieldsscanAnnotatedDefaultMethods(Map)protected void scanAnnotatedDefaultMethods(Map<Class<? extends Annotation>,List<FrameworkMethod>> methodsForAnnotations)
Scans for all default methods and adds those into methodsForAnnotations if and only if there is
no specific class implementation.
methodsForAnnotations - the accumulator of all annotated MethodsTestClass.addToAnnotationLists(org.junit.runners.model.FrameworkMember, Map)Copyright © 2015. All rights reserved.