1 /* 2 * Copyright (c) 2007 Mockito contributors 3 * This program is made available under the terms of the MIT License. 4 */ 5 6 package org.mockito.internal.progress; 7 8 import java.util.Set; 9 import org.mockito.listeners.MockitoListener; 10 import org.mockito.listeners.VerificationListener; 11 import org.mockito.mock.MockCreationSettings; 12 import org.mockito.stubbing.OngoingStubbing; 13 import org.mockito.verification.VerificationMode; 14 import org.mockito.verification.VerificationStrategy; 15 16 public interface MockingProgress { 17 reportOngoingStubbing(OngoingStubbing<?> ongoingStubbing)18 void reportOngoingStubbing(OngoingStubbing<?> ongoingStubbing); 19 pullOngoingStubbing()20 OngoingStubbing<?> pullOngoingStubbing(); 21 verificationListeners()22 Set<VerificationListener> verificationListeners(); 23 verificationStarted(VerificationMode verificationMode)24 void verificationStarted(VerificationMode verificationMode); 25 pullVerificationMode()26 VerificationMode pullVerificationMode(); 27 stubbingStarted()28 void stubbingStarted(); 29 stubbingCompleted()30 void stubbingCompleted(); 31 validateState()32 void validateState(); 33 reset()34 void reset(); 35 36 /** 37 * Removes ongoing stubbing so that in case the framework is misused 38 * state validation errors are more accurate 39 */ resetOngoingStubbing()40 void resetOngoingStubbing(); 41 getArgumentMatcherStorage()42 ArgumentMatcherStorage getArgumentMatcherStorage(); 43 mockingStarted(Object mock, MockCreationSettings settings)44 void mockingStarted(Object mock, MockCreationSettings settings); 45 addListener(MockitoListener listener)46 void addListener(MockitoListener listener); 47 removeListener(MockitoListener listener)48 void removeListener(MockitoListener listener); 49 setVerificationStrategy(VerificationStrategy strategy)50 void setVerificationStrategy(VerificationStrategy strategy); 51 maybeVerifyLazily(VerificationMode mode)52 VerificationMode maybeVerifyLazily(VerificationMode mode); 53 54 /** 55 * Removes all listeners added via {@link #addListener(MockitoListener)}. 56 */ clearListeners()57 void clearListeners(); 58 } 59