• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2017 Mockito contributors
3  * This program is made available under the terms of the MIT License.
4  */
5 package org.mockito.listeners;
6 
7 import org.mockito.Incubating;
8 import org.mockito.verification.VerificationEvent;
9 
10 /**
11  * This listener can be notified of verify invocations on a mock.
12  * <p>
13  * For this to happen, it must be registered using {@link org.mockito.internal.progress.MockingProgress#addListener(MockitoListener)}.
14  */
15 @Incubating
16 public interface VerificationListener extends MockitoListener {
17     /**
18      * Called after a verification happened.
19      * This includes verifications that fail due to the verification mode failing.
20      *
21      * @param verificationEvent the event that occurred.
22      */
onVerification(VerificationEvent verificationEvent)23     void onVerification(VerificationEvent verificationEvent);
24 }
25