All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.mockito.internal.handler.MockHandlerFactory Maven / Gradle / Ivy

There is a newer version: 5.12.0
Show newest version
/*
 * 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 final class MockHandlerFactory {

    public static  MockHandler createMockHandler(MockCreationSettings settings) {
        MockHandler handler = new MockHandlerImpl(settings);
        MockHandler nullResultGuardian = new NullResultGuardian(handler);
        return new InvocationNotifierHandler(nullResultGuardian, settings);
    }

    private MockHandlerFactory() {}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy