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

com.fitbur.mockito.internal.stubbing.defaultanswers.GloballyConfiguredAnswer Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
/*
 * Copyright (c) 2007 Mockito contributors
 * This program is made available under the terms of the MIT License.
 */
package com.fitbur.mockito.internal.stubbing.defaultanswers;

import java.io.Serializable;

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

/**
 * Globally configured Answer.
 * 

* See javadoc for {@link IMockitoConfiguration} */ public class GloballyConfiguredAnswer implements Answer, Serializable { private static final long serialVersionUID = 3585893470101750917L; public Object answer(InvocationOnMock invocation) throws Throwable { return new GlobalConfiguration().getDefaultAnswer().answer(invocation); } }