blob: e8b44cb44c46d08914067ee62995cf718234e9a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/
package org.mockito.internal.handler;
import org.mockito.invocation.MockHandler;
import org.mockito.mock.MockCreationSettings;
/**
* by Szczepan Faber, created at: 5/21/12
*/
public class MockHandlerFactory {
public static <T> MockHandler<T> createMockHandler(MockCreationSettings<T> settings) {
MockHandler<T> handler = new MockHandlerImpl<T>(settings);
MockHandler<T> nullResultGuardian = new NullResultGuardian<T>(handler);
return new InvocationNotifierHandler<T>(nullResultGuardian, settings);
}
}
|