• 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.verification;
6 
7 import org.mockito.Incubating;
8 import org.mockito.internal.verification.api.VerificationData;
9 
10 /**
11  * Contains all information about a verification that has happened.
12  */
13 @Incubating
14 public interface VerificationEvent {
15     /**
16      * @return The mock that a verification happened on.
17      */
getMock()18     Object getMock();
19 
20     /**
21      * @return the {@link VerificationMode} that was used.
22      */
getMode()23     VerificationMode getMode();
24 
25     /**
26      * @return the {@link VerificationData} that was verified on.
27      */
getData()28     VerificationData getData();
29 
30     /**
31      * A nullable Throwable if it is null, the verification succeeded,
32      * otherwise the throwable contains the cause of why the verification failed.
33      *
34      * @return null or the error.
35      */
getVerificationError()36     Throwable getVerificationError();
37 }
38