All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.mockito.listeners.InvocationListener Maven / Gradle / Ivy

There is a newer version: 5.12.0
Show newest version
/*
 * Copyright (c) 2007 Mockito contributors
 * This program is made available under the terms of the MIT License.
 */
package org.mockito.listeners;

import org.mockito.MockSettings;

/**
 * This listener can be notified of method invocations on a mock.
 *
 * For this to happen, it must be registered using {@link MockSettings#invocationListeners(InvocationListener...)}.
 */
public interface InvocationListener {

    /**
     * Called after the invocation of the listener's mock if it returned normally.
     *
     * 

* Exceptions caused by this invocationListener will raise a {@link org.mockito.exceptions.base.MockitoException}. *

* * @param methodInvocationReport Information about the method call that just happened. * * @see MethodInvocationReport */ void reportInvocation(MethodInvocationReport methodInvocationReport); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy