@Test public void shouldAddVerboseLoggingListener() { //given assertFalse(mockSettingsImpl.hasInvocationListeners()); //when mockSettingsImpl.verboseLogging(); //then assertContainsType(mockSettingsImpl.getInvocationListeners(), VerboseMockInvocationLogger.class); }
public MockSettings verboseLogging() { if (!invocationListenersContainsType(VerboseMockInvocationLogger.class)) { invocationListeners(new VerboseMockInvocationLogger()); } return this; }