Package org.mockito.internal.stubbing.defaultanswers

Source Code of org.mockito.internal.stubbing.defaultanswers.GloballyConfiguredAnswer

/*
* Copyright (c) 2007 Mockito contributors
* This program is made available under the terms of the MIT License.
*/

package org.mockito.internal.stubbing.defaultanswers;

import java.io.Serializable;

import org.mockito.configuration.IMockitoConfiguration;
import org.mockito.internal.configuration.GlobalConfiguration;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;

/**
* Globally configured Answer.
* <p>
* See javadoc for {@link IMockitoConfiguration}
*/
public class GloballyConfiguredAnswer implements Answer<Object>, Serializable {
   
    private static final long serialVersionUID = 3585893470101750917L;

    public Object answer(InvocationOnMock invocation) throws Throwable {
        return new GlobalConfiguration().getDefaultAnswer().answer(invocation);
    }
}
TOP

Related Classes of org.mockito.internal.stubbing.defaultanswers.GloballyConfiguredAnswer

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.