Polish
Closes gh-5836
This commit is contained in:
@@ -105,7 +105,7 @@ public @interface MockBean {
|
||||
* When {@code @MockBean} also defines a {@code name} this attribute can only contain
|
||||
* a single value.
|
||||
* <p>
|
||||
* If this is the only attribute specified consider using the {@code value} alias
|
||||
* If this is the only specified attribute consider using the {@code value} alias
|
||||
* instead.
|
||||
* @return the classes to mock
|
||||
*/
|
||||
|
||||
@@ -70,7 +70,7 @@ class MockDefinition extends Definition {
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the classes that should be mocked.
|
||||
* Return the class that should be mocked.
|
||||
* @return the class to mock; never {@code null}
|
||||
*/
|
||||
public Class<?> getClassToMock() {
|
||||
@@ -79,7 +79,7 @@ class MockDefinition extends Definition {
|
||||
|
||||
/**
|
||||
* Return the extra interfaces.
|
||||
* @return the extra interfaces or an empty array
|
||||
* @return the extra interfaces or an empty set
|
||||
*/
|
||||
public Set<Class<?>> getExtraInterfaces() {
|
||||
return this.extraInterfaces;
|
||||
@@ -87,7 +87,7 @@ class MockDefinition extends Definition {
|
||||
|
||||
/**
|
||||
* Return the answers mode.
|
||||
* @return the answer the answers mode; never {@code null}
|
||||
* @return the answers mode; never {@code null}
|
||||
*/
|
||||
public Answers getAnswer() {
|
||||
return this.answer;
|
||||
|
||||
@@ -55,7 +55,7 @@ public enum MockReset {
|
||||
private static final MockUtil util = new MockUtil();
|
||||
|
||||
/**
|
||||
* Create {@link MockSettings settings} to be use used with mocks where reset should
|
||||
* Create {@link MockSettings settings} to be used with mocks where reset should
|
||||
* occur before each test method runs.
|
||||
* @return mock settings
|
||||
*/
|
||||
@@ -64,7 +64,7 @@ public enum MockReset {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create {@link MockSettings settings} to be use used with mocks where reset should
|
||||
* Create {@link MockSettings settings} to be used with mocks where reset should
|
||||
* occur after each test method runs.
|
||||
* @return mock settings
|
||||
*/
|
||||
@@ -73,7 +73,7 @@ public enum MockReset {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create {@link MockSettings settings} to be use used with mocks where a specific
|
||||
* Create {@link MockSettings settings} to be used with mocks where a specific
|
||||
* reset should occur.
|
||||
* @param reset the reset type
|
||||
* @return mock settings
|
||||
|
||||
@@ -33,7 +33,7 @@ class MockitoContextCustomizerFactory implements ContextCustomizerFactory {
|
||||
public ContextCustomizer createContextCustomizer(Class<?> testClass,
|
||||
List<ContextConfigurationAttributes> configAttributes) {
|
||||
// We gather the explicit mock definitions here since they form part of the
|
||||
// MergedContextConfiguration key. Different mocks need to have a different key
|
||||
// MergedContextConfiguration key. Different mocks need to have a different key.
|
||||
DefinitionsParser parser = new DefinitionsParser();
|
||||
parser.parse(testClass);
|
||||
return new MockitoContextCustomizer(parser.getDefinitions());
|
||||
|
||||
@@ -114,7 +114,7 @@ public class MockitoPostProcessor extends InstantiationAwareBeanPostProcessorAda
|
||||
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)
|
||||
throws BeansException {
|
||||
Assert.isInstanceOf(BeanDefinitionRegistry.class, beanFactory,
|
||||
"@RegisterMocks can only be used on bean factories that "
|
||||
"@MockBean can only be used on bean factories that "
|
||||
+ "implement BeanDefinitionRegistry");
|
||||
postProcessBeanFactory(beanFactory, (BeanDefinitionRegistry) beanFactory);
|
||||
}
|
||||
|
||||
@@ -75,7 +75,7 @@ class MockitoTestExecutionListener extends AbstractTestExecutionListener {
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link FieldCallback} to collect mockito annotations.
|
||||
* {@link FieldCallback} to collect Mockito annotations.
|
||||
*/
|
||||
private static class MockitoAnnotationCollection implements FieldCallback {
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ public @interface SpyBean {
|
||||
* When {@code @MockBean} also defines a {@code name} this attribute can only contain
|
||||
* a single value.
|
||||
* <p>
|
||||
* If this is the only attribute specified consider using the {@code value} alias
|
||||
* If this is the only specified attribute consider using the {@code value} alias
|
||||
* instead.
|
||||
* @return the classes to mock
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user