See gh-17413
This commit is contained in:
Johnny Lim
2019-07-03 10:10:01 +09:00
committed by Stephane Nicoll
parent 939a247d87
commit 426ef749db
10 changed files with 19 additions and 18 deletions

View File

@@ -191,7 +191,7 @@ public class SpringBootTestContextBootstrapper extends DefaultTestContextBootstr
* Determines the resource base path for web applications using the value of
* {@link WebAppConfiguration @WebAppConfiguration}, if any, on the test class of the
* given {@code configuration}. Defaults to {@code src/main/webapp} in its absence.
* @param configuration the configure to examine
* @param configuration the configuration to examine
* @return the resource base path
* @since 2.1.6
*/

View File

@@ -23,7 +23,6 @@ import java.util.Set;
import org.mockito.Answers;
import org.mockito.MockSettings;
import org.mockito.Mockito;
import org.springframework.core.ResolvableType;
import org.springframework.core.style.ToStringCreator;
@@ -32,6 +31,8 @@ import org.springframework.util.ClassUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import static org.mockito.Mockito.mock;
/**
* A complete definition that can be used to create a Mockito mock.
*
@@ -150,7 +151,7 @@ class MockDefinition extends Definition {
if (this.serializable) {
settings.serializable();
}
return (T) Mockito.mock(this.typeToMock.resolve(), settings);
return (T) mock(this.typeToMock.resolve(), settings);
}
}

View File

@@ -28,6 +28,8 @@ import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import static org.mockito.Mockito.mock;
/**
* A complete definition that can be used to create a Mockito spy.
*
@@ -98,7 +100,7 @@ class SpyDefinition extends Definition {
if (this.isProxyTargetAware()) {
settings.verificationStartedListeners(new SpringAopBypassingVerificationStartedListener());
}
return (T) Mockito.mock(instance.getClass(), settings);
return (T) mock(instance.getClass(), settings);
}
/**