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 18 void reportOngoingStubbing(OngoingStubbing<?> ongoingStubbing); 19 20 OngoingStubbing<?> pullOngoingStubbing(); 21 22 Set<VerificationListener> verificationListeners(); 23 24 void verificationStarted(VerificationMode verificationMode); 25 26 VerificationMode pullVerificationMode(); 27 28 void stubbingStarted(); 29 30 void stubbingCompleted(); 31 32 void validateState(); 33 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 */ 40 void resetOngoingStubbing(); 41 42 ArgumentMatcherStorage getArgumentMatcherStorage(); 43 44 void mockingStarted(Object mock, MockCreationSettings settings); 45 46 void addListener(MockitoListener listener); 47 48 void removeListener(MockitoListener listener); 49 50 void setVerificationStrategy(VerificationStrategy strategy); 51 52 VerificationMode maybeVerifyLazily(VerificationMode mode); 53 54 /** 55 * Removes all listeners added via {@link #addListener(MockitoListener)}. 56 */ 57 void clearListeners(); 58 } 59