Class NotificationBuilder
- java.lang.Object
-
- org.powermock.modules.junit4.internal.impl.NotificationBuilder
-
class NotificationBuilder extends java.lang.ObjectStateful class that, from information from JUnit and test-classes, can build and send notifications to PowerMockTestNotifier.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classNotificationBuilder.DetectedTestRunBehaviourprivate classNotificationBuilder.OngoingTestRun
-
Field Summary
Fields Modifier and Type Field Description private NotificationBuilder.DetectedTestRunBehaviourbehaviourprivate org.junit.runner.DescriptioncurrentDescriptionprivate java.lang.ObjectcurrentTestInstanceprivate java.lang.reflect.MethodlatestMethodprivate java.lang.ObjectlatestTestInstanceprivate static java.util.regex.PatternmethodDisplayNameRgxprivate java.util.Map<java.lang.Object,java.util.List<java.lang.reflect.Method>>methodsPerInstanceprivate java.util.Map<org.junit.runner.Description,NotificationBuilder.OngoingTestRun>ongoingTestRunsprivate java.util.List<?>pendingTestInstancesprivate PowerMockTestNotifierpowerMockTestNotifierprivate java.lang.StringtestClassNameprivate java.lang.reflect.Method[]testMethodsprivate static java.lang.Object[]unsupportedMethodArgs
-
Constructor Summary
Constructors Constructor Description NotificationBuilder(java.lang.reflect.Method[] testMethods, PowerMockTestNotifier notifier, java.util.List<?> pendingTestInstances)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidassumptionFailed(org.junit.runner.Description d)private java.lang.reflect.MethoddetermineTestMethod(org.junit.runner.Description d)(package private) voidfailure(org.junit.runner.notification.Failure f)private booleannotify(org.junit.runner.Description d, Result result)private java.lang.reflect.MethodreloadMethod(java.lang.Class<?> testClass, java.lang.reflect.Method m)private java.lang.Class<?>reloadParamType(java.lang.Class<?> testClass, java.lang.Class<?> typeToReload)(package private) voidtestFinished(org.junit.runner.Description d)(package private) voidtestIgnored(org.junit.runner.Description d)(package private) voidtestInstanceCreated(java.lang.Object newTestInstance)(package private) voidtestStartHasBeenFired(org.junit.runner.Description d)(package private) voidtestSuiteStarted(java.lang.Class<?> testClass)
-
-
-
Field Detail
-
methodDisplayNameRgx
private static final java.util.regex.Pattern methodDisplayNameRgx
-
testMethods
private final java.lang.reflect.Method[] testMethods
-
pendingTestInstances
private final java.util.List<?> pendingTestInstances
-
powerMockTestNotifier
private final PowerMockTestNotifier powerMockTestNotifier
-
behaviour
private NotificationBuilder.DetectedTestRunBehaviour behaviour
-
currentDescription
private org.junit.runner.Description currentDescription
-
currentTestInstance
private java.lang.Object currentTestInstance
-
testClassName
private java.lang.String testClassName
-
latestTestInstance
private java.lang.Object latestTestInstance
-
latestMethod
private java.lang.reflect.Method latestMethod
-
unsupportedMethodArgs
private static final java.lang.Object[] unsupportedMethodArgs
-
methodsPerInstance
private final java.util.Map<java.lang.Object,java.util.List<java.lang.reflect.Method>> methodsPerInstance
-
ongoingTestRuns
private final java.util.Map<org.junit.runner.Description,NotificationBuilder.OngoingTestRun> ongoingTestRuns
-
-
Constructor Detail
-
NotificationBuilder
public NotificationBuilder(java.lang.reflect.Method[] testMethods, PowerMockTestNotifier notifier, java.util.List<?> pendingTestInstances)
-
-
Method Detail
-
determineTestMethod
private java.lang.reflect.Method determineTestMethod(org.junit.runner.Description d)
-
reloadParamType
private java.lang.Class<?> reloadParamType(java.lang.Class<?> testClass, java.lang.Class<?> typeToReload)
-
reloadMethod
private java.lang.reflect.Method reloadMethod(java.lang.Class<?> testClass, java.lang.reflect.Method m)
-
testSuiteStarted
void testSuiteStarted(java.lang.Class<?> testClass)
-
testStartHasBeenFired
void testStartHasBeenFired(org.junit.runner.Description d)
-
testInstanceCreated
void testInstanceCreated(java.lang.Object newTestInstance)
-
testIgnored
void testIgnored(org.junit.runner.Description d)
-
assumptionFailed
void assumptionFailed(org.junit.runner.Description d)
-
failure
void failure(org.junit.runner.notification.Failure f)
-
testFinished
void testFinished(org.junit.runner.Description d)
-
notify
private boolean notify(org.junit.runner.Description d, Result result)- Returns:
- true if notification concerns an ongoing testrun; otherwise false when there is no test launched for the specified description
-
-