Interface PowerMockTestListener

    • Method Detail

      • beforeTestSuiteStarted

        void beforeTestSuiteStarted​(Class<?> testClass,
                                    Method[] testMethods)
                             throws Exception
        Invoked once before the test run has started.
        Parameters:
        testClass - The type of the test to be executed.
        testMethods - The test methods that will be executed during the test.
        Throws:
        Exception - If something unexpected occurs.
      • beforeTestMethod

        void beforeTestMethod​(Object testInstance,
                              Method method,
                              Object[] arguments)
                       throws Exception
        Invoked before each test method.
        Parameters:
        testInstance - The test case instance.
        method - The test method that is currently executed.
        arguments - The arguments passed to the test method if any. May be an empty array but never null.
        Throws:
        Exception - If something unexpected occurs.
      • afterTestMethod

        void afterTestMethod​(Object testInstance,
                             Method method,
                             Object[] arguments,
                             TestMethodResult testResult)
                      throws Exception
        Invoked after each test method. * @param testInstance The test case instance.
        Parameters:
        method - The test method that is currently executed.
        arguments - The arguments passed to the test method if any. May be an empty array but never null.
        testResult - The outcome of the test method.
        Throws:
        Exception - If something unexpected occurs.
      • afterTestSuiteEnded

        void afterTestSuiteEnded​(Class<?> testClass,
                                 Method[] methods,
                                 TestSuiteResult testResult)
                          throws Exception
        Invoked after a test suite has ended.
        Parameters:
        testClass - The type of the test to be executed.
        methods - The test methods that were executed during the test.
        testResult - The outcome of the test suite.
        Throws:
        Exception - If something unexpected occurs.